package com.dk.mdm.model.pojo.core;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;

import com.dk.common.infrastructure.handler.TimestampTypeHandler;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.time.LocalDateTime;

/**
 *  用户
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName(value = "t_user_login_log", autoResultMap = true,schema="core")
@ApiModel(value="实体类：用户", description="表名：t_user_login_log")
public class UserLoginLog implements Serializable {

    /*
     * 数据库字段
     */

    /**
     * 用户ID
     */
    @TableId(value = "log_id", type = IdType.AUTO)
    @ApiModelProperty(value = "履历ID")
    private Integer logId;

    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private Integer userId;


    /**
     * 应用代码
     */
    @Excel(name = "应用代码")
    @ApiModelProperty(value = "应用代码")
    private String appCode;


    /**
     * 用户名称
     */
    @Excel(name = "用户名称")
    @ApiModelProperty(value = "用户名称")
    private String userName;


    /**
     * 类型
     */
    @Excel(name = "类型")
    @ApiModelProperty(value = "类型")
    private Integer loginType;


    /**
     * 客户端IP
     */
    @Excel(name = "客户端IP")
    @ApiModelProperty(value = "客户端IP")
    private String clientIp;

    /**
     * 客户端信息
     */
    @Excel(name = "客户端信息")
    @ApiModelProperty(value = "客户端信息")
    private String clientInfo;


    @ApiModelProperty(value = "")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDateTime opTimestamp;

    /*
     * 相关属性
     * @TableField(exist = false)
     */

    /*
     * 关联属性 + 查询条件
     * @TableField(exist = false)
     */


    private static final long serialVersionUID = 1L;

}
