package com.starry.admin.modules.system.module.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.starry.admin.modules.system.vo.StatusConverter;
import com.starry.common.domain.BasePageEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 系统访问日志表对象 sys_login_log
 *
 * @author admin
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "登录日志查询参数", description = "系统访问日志查询条件")
public class SysLoginLogVo extends BasePageEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    @ApiModelProperty(value = "日志ID", example = "1", notes = "主键ID")
    @TableId(value = "login_id", type = IdType.AUTO)
    private Long loginId;

    /**
     * 用户账号
     */
    @ApiModelProperty(value = "用户账号", example = "admin", notes = "登录的用户账号，支持模糊查询")
    @ExcelProperty(value = "用户账号")
    private String userCode;

    /**
     * 登录IP地址
     */
    @ApiModelProperty(value = "登录IP", example = "127.0.0.1", notes = "用户登录的IP地址")
    @ExcelProperty(value = "登录IP地址")
    private String ipaddr;

    /**
     * 登录地点
     */
    @ApiModelProperty(value = "登录地点", example = "北京", notes = "根据IP解析的登录地理位置")
    @ExcelProperty(value = "登录地点")
    private String loginLocation;

    /**
     * 浏览器类型
     */
    @ApiModelProperty(value = "浏览器类型", example = "Chrome", notes = "用户使用的浏览器")
    @ExcelProperty(value = "浏览器类型")
    private String browser;

    /**
     * 操作系统
     */
    @ApiModelProperty(value = "操作系统", example = "Windows 10", notes = "用户使用的操作系统")
    @ExcelProperty(value = "操作系统")
    private String os;

    /**
     * 提示消息
     */
    @ApiModelProperty(value = "提示消息", example = "登录成功", notes = "登录操作的提示信息")
    private String msg;

    /**
     * 登录状态（0成功 1失败）
     */
    @ApiModelProperty(value = "登录状态", example = "0", notes = "0:成功 1:失败")
    @ExcelProperty(value = "登录状态", converter = StatusConverter.class)
    private Integer status;

    /**
     * 访问时间
     */
    @ApiModelProperty(value = "登录时间", example = "2023-01-01 00:00:00", notes = "用户登录的时间")
    private Date loginTime;

}
