package cn.reghao.tnb.account.app.model.po;

import cn.reghao.jutil.jdk.db.BaseObject;
import lombok.*;

/**
 * 用户登入日志
 *
 * @author reghao
 * @date 2022-07-08 10:27:55
 */
@EqualsAndHashCode(callSuper = true)
@NoArgsConstructor
@Setter
@Getter
public class LoginAttempts extends BaseObject<Integer> {
    private String loginId;
    private Long userId;
    private Integer loginType;
    private Integer plat;
    private Long loginAt;
    private String loginIp;
    private String userAgent;
    private Boolean rememberMe;
    private Boolean success;

    public LoginAttempts(String loginId, long userId, int plat, String loginIp,
                         int loginType, String userAgent, boolean rememberMe) {
        this.loginId = loginId;
        this.userId = userId;
        this.loginType = loginType;
        this.plat = plat;
        this.loginAt = System.currentTimeMillis();
        this.loginIp = loginIp;
        this.userAgent = userAgent;
        this.rememberMe = rememberMe;
        this.success = true;
    }
}
