package com.example.demo.model;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * 登录日志实体。
 */
@Schema(description = "登录日志实体")
public class LoginLog {

    @Schema(description = "日志ID")
    private Long id;

    @Schema(description = "用户名")
    private String username;

    @Schema(description = "登录时间")
    private String loginTime;

    @Schema(description = "IP地址")
    private String ipAddress;

    @Schema(description = "设备信息")
    private String deviceInfo;

    @Schema(description = "结果：success-成功，fail-失败")
    private String result;

    @Schema(description = "失败原因")
    private String failReason;

    public LoginLog() {
    }

    public LoginLog(Long id, String username, String loginTime, String ipAddress,
                    String deviceInfo, String result, String failReason) {
        this.id = id;
        this.username = username;
        this.loginTime = loginTime;
        this.ipAddress = ipAddress;
        this.deviceInfo = deviceInfo;
        this.result = result;
        this.failReason = failReason;
    }

    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }
    public String getLoginTime() { return loginTime; }
    public void setLoginTime(String loginTime) { this.loginTime = loginTime; }
    public String getIpAddress() { return ipAddress; }
    public void setIpAddress(String ipAddress) { this.ipAddress = ipAddress; }
    public String getDeviceInfo() { return deviceInfo; }
    public void setDeviceInfo(String deviceInfo) { this.deviceInfo = deviceInfo; }
    public String getResult() { return result; }
    public void setResult(String result) { this.result = result; }
    public String getFailReason() { return failReason; }
    public void setFailReason(String failReason) { this.failReason = failReason; }
}
