package com.ym.mec.education.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 用户登录信息表
 * </p>
 *
 * @author lemeng
 * @since 2019-09-25
 */
@TableName("sys_user_login")
public class SysUserLogin extends Model<SysUserLogin> {

    private static final long serialVersionUID = 1L;

    @TableId("user_id_")
    private Integer userId;
    /**
     * 用户登录总次数
     */
    @TableField("login_count_")
    private Integer loginCount;
    /**
     * 最后登录时间
     */
    @TableField("last_login_time_")
    private Date lastLoginTime;
    /**
     * 最后登录IP
     */
    @TableField("last_login_ip_")
    private String lastLoginIp;
    /**
     * 连续登陆失败的次数
     */
    @TableField("fail_count_")
    private Integer failCount;
    /**
     * 锁定时间 单位：分钟(超过锁定时间自动解锁)
     */
    @TableField("lock_time_")
    private Integer lockTime;
    /**
     * 锁定日期
     */
    @TableField("lock_date_")
    private Date lockDate;


    public Integer getUserId() {
        return userId;
    }

    public SysUserLogin setUserId(Integer userId) {
        this.userId = userId;
        return this;
    }

    public Integer getLoginCount() {
        return loginCount;
    }

    public SysUserLogin setLoginCount(Integer loginCount) {
        this.loginCount = loginCount;
        return this;
    }

    public Date getLastLoginTime() {
        return lastLoginTime;
    }

    public SysUserLogin setLastLoginTime(Date lastLoginTime) {
        this.lastLoginTime = lastLoginTime;
        return this;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public SysUserLogin setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
        return this;
    }

    public Integer getFailCount() {
        return failCount;
    }

    public SysUserLogin setFailCount(Integer failCount) {
        this.failCount = failCount;
        return this;
    }

    public Integer getLockTime() {
        return lockTime;
    }

    public SysUserLogin setLockTime(Integer lockTime) {
        this.lockTime = lockTime;
        return this;
    }

    public Date getLockDate() {
        return lockDate;
    }

    public SysUserLogin setLockDate(Date lockDate) {
        this.lockDate = lockDate;
        return this;
    }

    @Override
    protected Serializable pkVal() {
        return this.userId;
    }

    @Override
    public String toString() {
        return "SysUserLogin{" +
        ", userId=" + userId +
        ", loginCount=" + loginCount +
        ", lastLoginTime=" + lastLoginTime +
        ", lastLoginIp=" + lastLoginIp +
        ", failCount=" + failCount +
        ", lockTime=" + lockTime +
        ", lockDate=" + lockDate +
        "}";
    }
}
