package com.hys.app.model.system.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.hys.app.framework.util.DateUtil;
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
import com.fasterxml.jackson.databind.annotation.JsonNaming;
import com.hys.app.model.support.validator.annotation.LogLevel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;


/**
 * 系统日志实体
 *
 * @author fk
 * @version v2.0
 * @since v2.0
 * 2021-03-22 16:05:58
 */
@TableName(value = "es_system_logs")
@ApiModel
@JsonNaming(value = PropertyNamingStrategy.SnakeCaseStrategy.class)
@Data
public class SystemLogs implements Serializable {

    private static final long serialVersionUID = 2535359233207726L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(hidden = true)
    private Long id;
    /**
     * 请求方法
     */
    @ApiModelProperty(name = "method", value = "请求方法")
    private String method;
    /**
     * 请求参数
     */
    @ApiModelProperty(name = "params", value = "请求参数")
    private String params;
    /**
     * 操作时间
     */
    @ApiModelProperty(name = "operate_time", value = "操作时间")
    private Long operateTime;
    /**
     * 日志级别
     * @see LogLevel
     */
    @ApiModelProperty(name = "level", value = "日志级别")
    private String level;
    /**
     * 端类型：管理端还是商家端
     */
    @ApiModelProperty(name = "client", value = "端类型：管理端还是商家端")
    private String client;
    /**
     * 操作描述
     */
    @ApiModelProperty(name = "operate_detail", value = "操作描述")
    private String operateDetail;
    /**
     * ip地址
     */
    @ApiModelProperty(name = "operate_ip", value = "ip地址")
    private String operateIp;
    /**
     * 操作员
     */
    @ApiModelProperty(name = "operator_name", value = "操作员")
    private String operatorName;
    /**
     * 操作员id，管理员id/会员id
     */
    @ApiModelProperty(name = "operator_id", value = "操作员id，管理员id/会员id")
    private Long operatorId;
    /**
     * 商家id, 店员要存储所属商家，管理端存0
     */
    @ApiModelProperty(name = "seller_id", value = "商家id, 店员要存储所属商家，管理端存0")
    private Long sellerId;

    @ApiModelProperty(name = "user_id", value = "登录人id")
    private Long userId;
}