package com.ho.user.api.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 用户表实体
 */
@Getter
@Setter
@ToString
public class SysUser implements Serializable {

    //只有user表的id用String 是为了满足shiro框架
    private String id;

    private String username;

    private String salt;

    private String password;

    private String phone;

    private Integer deptId;
    //集团id
    private Integer groupId;

    private String deptName;

    private String realName;

    private String nickName;

    private String email;

    private Integer status;

    private Integer sex;

    private Integer deleted;

    private String remark;

    //2022-08-19 新增 角色列表
    private List<Integer> roleIds;

    //2022-12-06 新增 岗位列表
    private List<Integer> positionIds;

    private String createId;

    private String updateId;

    private Integer createWhere;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date createTime;

    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone="GMT+8")
    private Date updateTime;

    private Integer userLevel;

    /**
     * 有效期（1永久，2临时）
     */
    private Integer periodOfValidity;
    //岗位名称
    private String postName;

    //岗位id
    private Integer postId;
}