package com.aiotagro.cattletrade.business.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Getter;
import lombok.Setter;

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

/**
 * <p>
 * 员工管理表
 * </p>
 *
 * @author admin
 * @since 2024-12-26
 */
@Getter
@Setter
@TableName("sys_user")
public class SysUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 员工姓名
     */
    @TableField("name")
    private String name;

    /**
     * 手机号
     */
    @TableField("mobile")
    private String mobile;

    /**
     * 岗位id
     */
    @TableField("role_id")
    private Integer roleId;

    /**
     * 密码
     */
    @TableField("password")
    private String password;

    /**
     * 状态  1-正常 0-禁用
     */
    @TableField("status")
    private Integer status;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("create_time")
    private Date createTime;

    /**
     * 创建人id
     */
    @TableField("create_by")
    private Integer createBy;

    /**
     * 更新时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("update_time")
    private Date updateTime;

    /**
     * 更新人id
     */
    @TableField("update_by")
    private Integer updateBy;

    /**
     * 最后登录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField("last_login_time")
    private Date lastLoginTime;

    /**
     * 删除状态  0-正常  1-已删除
     */
    @TableLogic("is_delete")
    private Integer isDelete;

    /**
     * 创建人
     */
    @TableField(exist = false)
    private String createName;

    /**
     * 岗位/角色
     */
    @TableField(exist = false)
    private String roleName;
}
