package com.starry.admin.modules.system.vo;

import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
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_operation_log
 *
 * @author admin
 */
@EqualsAndHashCode(callSuper = true)
@Data
@ApiModel(value = "操作日志查询参数", description = "系统操作日志查询条件")
public class SysOperationLogVo extends BasePageEntity {

    private static final long serialVersionUID = 1L;

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

    /**
     * 模块标题
     */
    @ApiModelProperty(value = "模块标题", example = "用户管理", notes = "操作的系统模块")
    @ExcelProperty(value = "系统模块")
    private String title;

    /**
     * 业务类型（0其它 1新增 2修改 3删除）
     */
    @ApiModelProperty(value = "业务类型", example = "1", notes = "0:其它 1:新增 2:修改 3:删除")
    private Integer businessType;

    /**
     * 业务类型数组
     */
    @ApiModelProperty(value = "业务类型数组", notes = "多个业务类型的集合")
    @TableField(exist = false)
    private Integer[] businessTypes;

    /**
     * 方法名称
     */
    @ApiModelProperty(value = "方法名称", example = "com.starry.admin.modules.system.controller.SysUserController.create", notes = "调用的方法名")
    @ExcelProperty(value = "方法名称")
    private String method;

    /**
     * 请求方式
     */
    @ApiModelProperty(value = "请求方式", example = "POST", notes = "HTTP请求方式")
    private String requestMethod;

    /**
     * 操作类别（0其它 1后台用户 2手机端用户）
     */
    @ApiModelProperty(value = "操作类别", example = "1", notes = "0:其它 1:后台用户 2:手机端用户")
    private Integer operatorType;

    /**
     * 操作人员
     */
    @ApiModelProperty(value = "操作人员", example = "admin", notes = "执行操作的用户账号")
    private String operName;

    /**
     * 请求URL
     */
    @ApiModelProperty(value = "请求URL", example = "/system/user/create", notes = "请求的接口地址")
    private String operUrl;

    /**
     * 主机地址
     */
    @ApiModelProperty(value = "主机地址", example = "127.0.0.1", notes = "请求的IP地址")
    private String operIp;

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

    /**
     * 请求参数
     */
    @ApiModelProperty(value = "请求参数", notes = "请求的参数内容")
    private String operParam;

    /**
     * 返回参数
     */
    @ApiModelProperty(value = "返回参数", notes = "接口返回的结果")
    private String jsonResult;

    /**
     * 操作状态（0正常 1异常）
     */
    @ApiModelProperty(value = "操作状态", example = "0", notes = "0:正常 1:异常")
    private Integer status;

    /**
     * 错误消息
     */
    @ApiModelProperty(value = "错误消息", example = "权限不足", notes = "操作失败时的错误信息")
    private String errorMsg;

    /**
     * 操作时间
     */
    @ApiModelProperty(value = "操作时间", example = "2023-01-01 00:00:00", notes = "操作的时间")
    private Date operTime;

    /**
     * 部门名称
     */
    @ApiModelProperty(value = "部门名称", example = "研发部", notes = "操作人员所属部门")
    private String deptName;

    /**
     * 部门id
     */
    @ApiModelProperty(value = "部门ID", example = "1", notes = "操作人员所属部门ID")
    private Long deptId;

    /**
     * 租户ID
     */
    @ApiModelProperty(value = "租户ID", example = "1", notes = "所属租户ID")
    private Long tenantId;
}
