package com.xunhong.erp.turbo.user.infrastructure.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.xunhong.erp.turbo.datasource.domain.entity.BaseDO;
import com.xunhong.erp.turbo.datasource.handler.AesEncryptTypeHandler;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author shenyifei
 */
@Data
@TableName(value = "employee", autoResultMap = true)
@EqualsAndHashCode(callSuper = true)
public class EmployeeDO extends BaseDO<EmployeeDO> {

	/**
	 * 员工信息id
	 */
	@TableId(value = "employee_id", type = IdType.ASSIGN_ID)
	private Long employeeId;

	/**
	 * 用户ID
	 */
	@TableField(value = "user_id", updateStrategy = FieldStrategy.NEVER)
	private Long userId;

	/**
	 * 姓名
	 */
	@TableField(value = "name")
	private String name;

	/**
	 * 工号
	 */
	@TableField(value = "number")
	private String number;

	/**
	 * 头像
	 */
	@TableField(value = "avatar")
	private String avatar;

	/**
	 * 性别
	 */
	@TableField(value = "gender")
	private Integer gender;

	/**
	 * 手机号
	 */
	@TableField(value = "phone", typeHandler = AesEncryptTypeHandler.class)
	private String phone;

	/**
	 * 备注
	 */
	@TableField(value = "remark")
	private String remark;

	/**
	 * 状态
	 */
	@TableField(value = "status")
	private Boolean status;

}
