package com.app.entity.platform.monitor;

import com.app.entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


/**
 * 功能描述：操作日志实体
 *
 * @Auther 梁展鹏
 * @Date 2020/1/18 16:03
 */
@ApiModel("操作日志实体")
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@TableName("t_platform_operation_log")
public class OperationLog extends BaseEntity {

    @ApiModelProperty("操作用户")
    @TableField("username")
    private String username;

    @ApiModelProperty("日志类型")
    @TableField("type")
    private String type;

    @ApiModelProperty("操作ip")
    @TableField("ip")
    private String ip;

    @ApiModelProperty("操作ip地址")
    @TableField("ip_address")
    private String ipAddress;

    @ApiModelProperty("操作系统")
    @TableField("os")
    private String os;

    @ApiModelProperty("浏览器")
    @TableField("browser")
    private String browser;

    @ApiModelProperty("浏览器版本号")
    @TableField("browser_version")
    private String browserVersion;

    @ApiModelProperty("请求地址")
    @TableField("request_url")
    private String requestUrl;

    @ApiModelProperty("类路径")
    @TableField("class_name")
    private String className;

    @ApiModelProperty("方法名")
    @TableField("method")
    private String method;

    @ApiModelProperty("请求参数")
    @TableField("request")
    private String request;

    @ApiModelProperty("请求耗时")
    @TableField("time")
    private Long time;

    @ApiModelProperty("异常详细")
    @TableField("exception_detail")
    private byte[] exceptionDetail;

    @ApiModelProperty("备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty("错误来源（1后端、2前端）")
    @TableField("log_from")
    private String logFrom;

}
