package cn.sh.stc.sict.cloud.upms.model;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 系统日志
 *
 * @author F_xh
 * @date 2020-12-27 11:34:55
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_log")
public class SysLog extends Model<SysLog> {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    @ApiModelProperty(hidden = false, value = "")
    private Long id;
    /**
     *
     */
    @ApiModelProperty(hidden = false, value = "")
    private Byte type;
    /**
     *
     */
    @ApiModelProperty(hidden = false, value = "")
    private String title;
    /**
     *
     */
    @ApiModelProperty(hidden = false, value = "")
    private String serviceId;
    /**
     *
     */
    @ApiModelProperty(hidden = false, value = "")
    private String remoteAddr;
    /**
     *
     */
    @ApiModelProperty(hidden = false, value = "")
    private String createBy;
    /**
     *
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(hidden = true, value = "")
    private Long createUserId;
    /**
     *
     */
    @ApiModelProperty(hidden = true, value = "")
    private String userAgent;
    /**
     *
     */
    @ApiModelProperty(hidden = true, value = "")
    private String requestUri;
    /**
     *
     */
    @ApiModelProperty(hidden = true, value = "")
    private String method;
    /**
     *
     */
    @ApiModelProperty(hidden = true, value = "")
    private String params;
    /**
     *
     */
    @ApiModelProperty(hidden = true, value = "")
    private Long time;
    /**
     *
     */
    @ApiModelProperty(hidden = true, value = "")
    private String exception;
    /**
     *
     */
    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty(hidden = true, value = "")
    private Date createTime;

    /**
     * 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
