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

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

import java.time.LocalDateTime;

/**
 * 用户登录日志
 *
 * @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 LocalDateTime loginAt;
    private String loginIp;
    private String userAgent;
    private Boolean rememberMe;

    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 = LocalDateTime.now();
        this.loginIp = loginIp;
        this.userAgent = userAgent;
        this.rememberMe = rememberMe;
    }
}
