package com.ruoyi.interfaces.domain;

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

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

@Data
public class PtServiceLog implements Serializable {

    @TableId(value = "id", type = IdType.ASSIGN_UUID)
    @ApiModelProperty("id")
    private String id;
    @ApiModelProperty("服务ID")
    private String srvId;
    @ApiModelProperty("应用ID")
    private String appId;
    @ApiModelProperty("时间戳")
    @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone = "GMT+8")
    private Date tm;
    @ApiModelProperty("请求地址")
    private String srvUrl;
    @ApiModelProperty("请求方法 GET/POST")
    private String srvMethod;
    @ApiModelProperty("信息")
    private String msg;
    @ApiModelProperty("执行时间（毫秒）")
    private Long execTm;
    private String uuid;
    @TableField(exist = false)
    @ApiModelProperty("服务名称")
    private String name;
    @TableField(exist = false)
    @ApiModelProperty("请求用户名称")
    private String userName;
    @TableField(exist = false)
    @ApiModelProperty("请求次数")
    private String cnt;
    @TableField(exist = false)
    private String day;
    @TableField(exist = false)
    private String num;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("开始时间")
    private Date sttm;
    @TableField(exist = false)
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty("结束时间")
    private Date entm;
    @TableField(exist = false)
    @ApiModelProperty("应用名称")
    private String appName;
}
