package cn.estsh.i3plus.pojo.platform.bean;

import cn.estsh.i3plus.pojo.base.annotation.AnnoOutputColumn;
import cn.estsh.i3plus.pojo.base.bean.BaseBean;
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @Description : 用户登录记录
 * @Reference   :
 * @Author      : wei.peng
 * @Date        : 2018-10-22 16:58:42.856
 * @Modify      :
 **/
@Data
@Entity
@DynamicInsert
@DynamicUpdate
@EqualsAndHashCode(callSuper = true)
@Table(name="SYS_LOG_USER_LOGIN")
@ApiModel(value="用户登录记录",description = "用户登录记录")
public class SysLogUserLogin extends BaseBean {

    private static final long serialVersionUID = 4665598896654312569L;
    @Column(name="USER_ID")
    @ApiModelProperty(value ="用户ID" , access ="用户ID")
    @AnnoOutputColumn(hidden = true)
    private Long userId;

    @Column(name="LOG_LOGIN_NAME")
    @ApiModelProperty(value ="登录名称" , access ="登录名称")
    private String logLoginName;

    @Column(name="LOG_LOGIN_STATUS")
    @ApiModelProperty(value ="登录状态（枚举：1.成功，2.失败，3锁定）" , example ="1")
    @AnnoOutputColumn(refClass = CommonEnumUtil.USER_LOGIN_STATUS.class)
    private Integer logLoginStatus;

    @Column(name="LOG_LOGIN_PLATFORM")
    @ApiModelProperty(value ="登录平台ID（枚举）" , example ="1")
    @AnnoOutputColumn(hidden = true)
    private Integer logLoginPlatform;

    @Column(name="LOG_LOGIN_HOST")
    @ApiModelProperty(value ="登录IP" , access ="登录IP")
    private String logLoginHost;

    @Column(name="LOG_LOGIN_BROWSER")
    @ApiModelProperty(value ="登录浏览器" , access ="登录的浏览器")
    private String logLoginBrowser;

    @Column(name="LOG_LOGIN_DATE_TIME")
    @ApiModelProperty(value ="登录时间" , access ="登录时间")
    private String logLoginDateTime;

}
