package com.mosty.common.base.entity.log;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.validation.annotation.Validated;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ApiModel(value = "巡防力量表", description = "")
@TableName("sys_oper_log")
@Validated
public class SysOperLog implements Serializable {

    private static final long serialVersionUID = 2222248015038776527L;

    @Excel(name = "操作序号", cellType = Excel.ColumnType.NUMERIC)
    private Long operId;

    @Excel(name = "模块名称")
    @ApiModelProperty(value = "模块名称")
    private String mkmc;

    @Excel(name = "操作模块")
    @ApiModelProperty(value = "操作模块")
    private String title;

    @Excel(name = "业务类型", readConverterExp = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据")
    @ApiModelProperty(value = "0=其它,1=新增,2=修改,3=删除,4=授权,5=导出,6=导入,7=强退,8=生成代码,9=清空数据")
    private Integer businessType;

    @Excel(name = "请求方法")
    @ApiModelProperty(value = "请求方法")
    private String method;

    @Excel(name = "请求方式")
    private String requestMethod;

    @Excel(name = "操作类别", readConverterExp = "0=其它,1=后台用户,2=手机端用户")
    private Integer operatorType;

    @Excel(name = "操作人员")
    @ApiModelProperty(value = "操作人员")
    private String operName;

    @Excel(name = "操作人员ID")
    @ApiModelProperty(value = "操作人员ID")
    private String operUserId;

    @Excel(name = "操作人员身份证号")
    @ApiModelProperty(value = "操作人员身份证号")
    private String operSfzh;

    @Excel(name = "部门ID")
    private String ssbmid;

    @Excel(name = "部门代码")
    private String ssbmdm;

    @Excel(name = "部门名称")
    private String ssbm;

    @Excel(name = "请求地址")
    private String operUrl;

    @Excel(name = "操作地址")
    private String operIp;

    @Excel(name = "请求参数")
    private String operParam;

    @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, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date operTime = new Date();
}
