package com.crunii.micro.domain.entity.main;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * @author: LG
 * @date: 2024/1/8 17:39
 */
@Entity
@Table(name = "tsm_worker_logout")
@NamedQuery(name = "TsmWorkerLogout.findAll", query = "SELECT t FROM TsmWorkerLogout t")
@DynamicInsert
@DynamicUpdate
@Getter
@Setter
@ToString
//@EqualsAndHashCode(of = { "loginId" })
@ApiModel(description = "用户注销备份表")
public class TsmWorkerLogout implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
//    @SequenceGenerator(name = "tsm_worker_login_id_seq", sequenceName = "tsm_worker_login_id_seq", allocationSize = 1)
//    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "tsm_worker_login_id_seq")
    @Column(name = "login_id")
    @ApiModelProperty(value = "工号id")
    private int loginId;

    @Column(name = "login_code")
    @ApiModelProperty(value = "工号")
    private String loginCode;

    @Column(name = "login_pwd")
    @ApiModelProperty(value = "密码")
    private String loginPwd;

    @Column(name = "worker_name")
    @ApiModelProperty(value = "姓名")
    private String workerName;

    @Column(name = "org_id")
    @ApiModelProperty(value = "组织id")
    private String orgId;

	/*@Column(name = "org_id_num")
	@ApiModelProperty(value = "组织id")
	private String orgIdNum;*/

    @Column(name = "phone")
    @ApiModelProperty(value = "电话")
    private String phone;

    @Column(name = "mobile")
    @ApiModelProperty(value = "手机")
    private String mobile;

    @Column(name = "sex")
    @ApiModelProperty(value = "0 女 1 男")
    private Integer sex;

    @Column(name = "birthday")
    @ApiModelProperty(value = "生日")
    private java.util.Date birthday;

    @Column(name = "email")
    @ApiModelProperty(value = "邮件")
    private String email;

    @Column(name = "login_num")
    @ApiModelProperty(value = "登录次数")
    private int loginNum;

    @Column(name = "last_chg_pwd_time")
    @ApiModelProperty(value = "最后一次修改密码时间")
    private java.util.Date lastChgPwdTime;

    @Column(name = "state")
    @ApiModelProperty(value = "0:无效,1:有效,2:锁定")
    private int state;

    @Column(name = "create_time")
    @ApiModelProperty(value = "创建时间")
    private java.util.Date createTime;

    @Column(name = "league_code")
    @ApiModelProperty(value = "所属团组织")
    private String leagueCode;

    @Column(name = "identity_category")
    @ApiModelProperty(value = "身份类别（静态值）")
    private Integer identityCategory;

    @Column(name = "position")
    @ApiModelProperty("职位")
    private String position;

    @Column(name = "registration_system")
    @ApiModelProperty(value = "登记系统直属（静态值）")
    private Integer registrationSystem;

    @Column(name = "head_portrait_pic_key")
    @ApiModelProperty(value = "用户头像图片key")
    private String headPortraitPicKey;

    @Column(name = "last_login_time")
    @ApiModelProperty(value = "最后登录时间")
    private Date lastLoginTime;

    @Column(name = "openid")
    @ApiModelProperty(value = "微信openid")
    private String openid;

    @Column(name = "whether_temporary")
    @ApiModelProperty(value = "是否临时用户(1是,0否)")
    private Integer whetherTemporary;

    @Column(name = "timeout")
    @ApiModelProperty(value = "临时用户过期时间")
    private Date timeout;

    @Column(name = "account_id")
    @ApiModelProperty(value = "政钉id")
    private Long accountId;

    @Column(name = "signature_file_id")
    @ApiModelProperty(value = "签名照片文件id")
    private String signatureFileId;

    @Column(name = "source")
    @ApiModelProperty(value = "用户来源  1系统添加,2注册")
    private String source;

    @Column(name = "signature_url")
    @ApiModelProperty(value = "签名照片url")
    private String signatureUrl;

    @Column(name = "face_key")
    @ApiModelProperty(value = "面容公钥")
    private String faceKey;

    @Column(name = "worker_type")
    @ApiModelProperty(value = "用户类型")
    private String workerType;

    @ApiModelProperty(value = "所在部门")
    @Column(name = "department")
    private String department;
}
