/*
 * Author: wangjian
 * 生成entity
 */
package com.tofly.dc.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;


/**
 * 接口访问日志表
 *
 * @author zev
 * @date Wed Jan 05 00:00:00 CST 2022
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "TF_INTERFACE_LOG", resultMap = "interfaceLogMap")
/*@KeySequence("TF_INTERFACE_LOG")*/
@ApiModel
public class InterfaceLog extends Model<InterfaceLog> {
    private static final long serialVersionUID = 1L;

    /**
     * $column.comments
     */
    @TableId(value = "ID", type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "$column.comments")
    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    /**
     * 关联表TF_INTERFACE_MANAGE主键id
     */
    @ApiModelProperty(value = "关联表TF_INTERFACE_MANAGE主键id")
    private Long interfaceId;
    /**
     * 访问时间
     */
    @ApiModelProperty(value = "访问时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date accessTime;
    /**
     * 访问人id
     */
    @ApiModelProperty(value = "访问人id")
    private Long accessUserId;

    @ApiModelProperty(value = "访问人名称")
    @TableField(exist = false)
    private String accessUserName;
    /**
     * 访问返回时长(耗秒)
     */
    @ApiModelProperty(value = "访问返回时长(耗秒)")
    private Long operationLength;
    /**
     * 返回状态(0正常,1异常,2连接失败)
     */
    @ApiModelProperty(value = "返回状态(0正常,1异常,2连接失败)")
    private String state;

    @ApiModelProperty(value = "返回状态转义")
    @TableField(exist = false)
    private String stateName;
    @ApiModelProperty(value = "异常编码")
    private String errorCode;
    @ApiModelProperty(value = "异常说明")
    private String errorNote;

}
