package com.nantian.sc.cloud.admin.api.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

@Data
@ApiModel(value = "操作日志")
public class OperationLog implements Serializable {

    @TableId(value = "id")
    @ApiModelProperty(value = "主键id")
    private Long id;

    @ApiModelProperty(value = "操作模块")
    private String module;

    @ApiModelProperty(value = "操作类型")
    private String action;

    @ApiModelProperty(value = "方法名称")
    private String method;

    @ApiModelProperty(value = "备注信息")
    private String remark;

    @ApiModelProperty(value = "请求uri")
    private String requestUri;

    @ApiModelProperty(value = "操作ip地址")
    private String remoteAddr;

    @ApiModelProperty(value = "用户代理")
    private String userAgent;

    @ApiModelProperty(value = "操作用户id")
    private String userId;

    @ApiModelProperty(value = "操作用户登录名")
    private String userName;

    @ApiModelProperty(value = "操作用户真实名字")
    private String userRealName;

    @ApiModelProperty(value = "可以看到日志的用户，多个用户用逗号隔开（0超级用户, 1节能，2计量，3公共机构，4工信，5发改，6市场监督管理局，7企业用户）")
    private String userDept;

    @ApiModelProperty(value = "操作用户部门id")
    private Integer deptId;

    @ApiModelProperty(value = "执行时间")
    private String runTime;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date creatTime;

    @ApiModelProperty(value = "返回值")
    private String returnValue;
}
