package com.njcn.cloud.pojo.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 
 * </p>
 *
 * @author wr
 * @since 2023-10-31
 */
@Getter
@Setter
@TableName("app_user")
@ApiModel(value = "AppUser对象", description = "用户信息表")
public class AppUser {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("用户表GUID")
    @TableId("user_index")
    private String userIndex;

    @ApiModelProperty("用户别名")
    @TableField("Name")
    private String name;

    @ApiModelProperty("登录名")
    @TableField("Login_Name")
    private String loginName;

    @ApiModelProperty("登录密码")
    @TableField("Password")
    private String password;

    @ApiModelProperty("手机号")
    @TableField("Phone")
    private String phone;

    @ApiModelProperty("邮箱")
    @TableField("Email")
    private String email;

    @ApiModelProperty("注册时间")
    @TableField("Register_Time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime registerTime;

    @ApiModelProperty("密码有效期字段(初始化的时候跟注册时间一样)")
    @TableField("Psd_Validity")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime psdValidity;

    @ApiModelProperty("最后一次登录时间")
    @TableField("Login_Time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime loginTime;

    @ApiModelProperty("用户状态 0:删除; 1:正常; 2锁定;")
    @TableField("State")
    private Boolean state;

    @ApiModelProperty("密码错误次数")
    @TableField("Login_Error_Times")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Integer loginErrorTimes;

    @ApiModelProperty("第一次登陆错误的时间")
    @TableField("Login_First_Error_Time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime loginFirstErrorTime;

    @ApiModelProperty("营销人员名称（只针对主用户）")
    @TableField("Sem_Name")
    private String semName;

    @ApiModelProperty("营销人员手机（只针对主用户）")
    @TableField("Sem_Phone")
    private String semPhone;

    @ApiModelProperty("推荐码（新增主用户时候生成）")
    @TableField("Referral_Code")
    private String referralCode;

    @ApiModelProperty("设备码")
    @TableField("Dev_Code")
    private String devCode;

    @ApiModelProperty("用户类型")
    @TableField("User_Type")
    private String userType;

    @ApiModelProperty("用户等级")
    @TableField("User_Level")
    private String userLevel;


}
