package com.inspect.system.base.domain;

import com.inspect.base.core.annotation.Excel;
import com.inspect.base.core.annotation.Excel.ColumnType;
import com.inspect.base.core.web.domain.BaseEntity;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class SysOperateLog extends BaseEntity {
   private static final long serialVersionUID = 1L;
   @Excel(
      name = "操作序号",
      cellType = ColumnType.NUMERIC
   )
   private Long operateId;
   @Excel(
      name = "操作模块"
   )
   private String title;
   @Excel(
      name = "业务类型",
      readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据"
   )
   private Integer businessType;
   private Integer[] businessTypes;
   @Excel(
      name = "请求方法"
   )
   private String method;
   @Excel(
      name = "请求方式"
   )
   private String requestMethod;
   @Excel(
      name = "操作类别",
      readConverterExp = "0=其它,1=后台用户,2=手机端用户"
   )
   private Integer operateType;
   @Excel(
      name = "操作人员"
   )
   private String operateName;
   @Excel(
      name = "部门名称"
   )
   private String deptName;
   @Excel(
      name = "请求地址"
   )
   private String operateUrl;
   @Excel(
      name = "操作地址"
   )
   private String operateIp;
   @Excel(
      name = "请求参数"
   )
   private String operateParam;
   @Excel(
      name = "返回参数"
   )
   private String jsonResult;
   @Excel(
      name = "状态",
      readConverterExp = "0=正常,1=异常"
   )
   private Integer status;
   @Excel(
      name = "错误消息"
   )
   private String errorMsg;
   @JsonFormat(
      pattern = "yyyy-MM-dd HH:mm:ss"
   )
   @Excel(
      name = "操作时间",
      width = 30.0D,
      dateFormat = "yyyy-MM-dd HH:mm:ss"
   )
   private Date operateTime;
   @Excel(
      name = "审计日志",
      readConverterExp = "0=日常日志,1=审计日志"
   )
   private Integer auditLog;
}
