package com.ym.mec.education.entity;

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 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_log")
public class SysUserLoginLog extends Model<SysUserLoginLog> {

    private static final long serialVersionUID = 1L;

    /**
     * 会员ID
     */
    @TableField("user_id_")
    private Integer userId;
    /**
     * 登录IP
     */
    @TableField("login_ip_")
    private String loginIp;
    /**
     * 登录时间
     */
    @TableField("login_time_")
    private Date loginTime;
    /**
     * 终端类型(0,pc端;1,人工;2,移动端;3,自动)
     */
    @TableField("source_")
    private Integer source;
    @TableId(value = "id_", type = IdType.AUTO)
    private Long id;


    public Integer getUserId() {
        return userId;
    }

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

    public String getLoginIp() {
        return loginIp;
    }

    public SysUserLoginLog setLoginIp(String loginIp) {
        this.loginIp = loginIp;
        return this;
    }

    public Date getLoginTime() {
        return loginTime;
    }

    public SysUserLoginLog setLoginTime(Date loginTime) {
        this.loginTime = loginTime;
        return this;
    }

    public Integer getSource() {
        return source;
    }

    public SysUserLoginLog setSource(Integer source) {
        this.source = source;
        return this;
    }

    public Long getId() {
        return id;
    }

    public SysUserLoginLog setId(Long id) {
        this.id = id;
        return this;
    }

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

    @Override
    public String toString() {
        return "SysUserLoginLog{" +
        ", userId=" + userId +
        ", loginIp=" + loginIp +
        ", loginTime=" + loginTime +
        ", source=" + source +
        ", id=" + id +
        "}";
    }
}
