package com.hdkj.lt.core.sys.model.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.experimental.SuperBuilder;
import org.apache.ibatis.type.Alias;

import java.time.LocalDateTime;

/**
 * @Description: 扩展的SYS_USERS表，填加了ISC_ID等字段
 * @Author: wenhao
 * @Create: 2024/02/20 9:36
 * @Version: 1.0
 */
@Getter
@Setter
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@ToString(callSuper = true)
@EqualsAndHashCode
@TableName("SYS_USERS")
@Alias("ExtendSysUser") //轻骑兵底层依赖中已经写了对该表的CRUD操作，这里重写是为了进行扩展，Mybatis Plus不允许有同类名同表名的存在，所以取别名可以解决问题
public class SysUser {

    @TableId(value = "USER_ID", type = IdType.ASSIGN_ID)
    private Long userId;

    private String userName;

    private String password;

    private String accountStatus;

    private Integer securityLevel;

    private Integer maxSessions;

    private String isSys;

    private String isCpublic;

    private LocalDateTime createTime;

    private Long creator;

    private LocalDateTime lastTime;

    private Long lastEditor;

    private LocalDateTime lockTime;

    private LocalDateTime expiredTime;

    private LocalDateTime pswdUptTime;

    private LocalDateTime pswdTime;

    private Long corporationId;

    private Long departmentId;

    private Long employeeId;

    private String eMail;

    private String wechat;

    private String telephone;

    private String mobile;

    @TableField("CHAR_1")
    private String char1;

    @TableField("CHAR_2")
    private String char2;

    @TableField("NUM_1")
    private Integer num1;

    @TableField("NUM_2")
    private Integer num2;

    private Long permissionStruId;

    private Integer userOrder;

    private String provinceCode;

    private String userAccount;

    private String typeProperty;

    private String startTime;

    private String lastLoginTime;

    private LocalDateTime accessLoginStartTime;

    private LocalDateTime accessLoginEndTime;

    private String totpKey;

    private String loginTimeLimit;

    private String loginIpLimit;

    private String dataScopeType;

    private String iscId;

}
