package com.codvision.monitor.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.codvision.commoncore.enums.SqlOperator;
import com.codvision.webcore.annotation.QueryCondition;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * <p>
 * 系统日志
 * </p>
 *
 * @author lingee
 * @since 2023-11-20
 */
@Data
@TableName("tbl_sys_log")
@ApiModel(value = "SysLog", description = "系统日志")
public class SysLog implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("日志类型")
    @QueryCondition(condition = SqlOperator.EQ)
    private String type;

    @ApiModelProperty("操作人")
    private String operator;

    @ApiModelProperty("操作人用户id")
    private Integer operatorUid;

    @ApiModelProperty("日志内容")
    @QueryCondition(condition = SqlOperator.LIKE)
    private String content;

    @ApiModelProperty("操作接口")
    private String method;

    @ApiModelProperty("创建时间")
    private Date createTime;

    @ApiModelProperty("ip地址")
    private String ip;

    @ApiModelProperty("参数")
    private String params;

    @ApiModelProperty("开始时间")
    @TableField(exist = false)
    private Date beginTime;

    @ApiModelProperty("结束时间")
    @TableField(exist = false)
    private Date endTime;

}
