package com.yuchen.saas.manage.user.api.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.nest.springwrap.core.tenant.mp.TenantEntity;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;


@Data
@TableName("nest_user_info")
@EqualsAndHashCode(callSuper = true)
public class UserInfoEntity extends TenantEntity {

	private static final long serialVersionUID = 1L;

	@ApiModelProperty(value = "组名称")
	private String name;

	@ApiModelProperty(value = "真名")
	private String realName;

	@ApiModelProperty(value = "头像")
	private String avatar;

	@ApiModelProperty(value = "电子邮件")
	private String email;

	@ApiModelProperty(value = "手机")
	private String phone;

	@ApiModelProperty(value = "生日")
	@DateTimeFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	@JsonFormat(
			pattern = "yyyy-MM-dd HH:mm:ss"
	)
	private Date birthday;

	@ApiModelProperty(value = "性别")
	private Integer sex;

	@ApiModelProperty(value = "部门id")
	@JsonSerialize(
			using = ToStringSerializer.class
	)
	private String deptId;

	@ApiModelProperty(value = "岗位id")
	@JsonSerialize(
			using = ToStringSerializer.class
	)
	private String postId;

	@ApiModelProperty(value = "职位类型:1是管理员2是普通员工")
	private Integer jobType;

	@ApiModelProperty(value = "是否禁用")
	private Integer isDisable;
}
