package com.fdkankan.gateway.log;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.Date;

@Data
@Document("GatewayLog")
public class GatewayLog {

    @Id
    private String id;
    /**访问实例*/
    @Field("targetServer")
    private String targetServer;
    /**请求路径*/
    @Field("requestPath")
    private String requestPath;
    /**请求方法*/
    @Field("requestMethod")
    private String requestMethod;
    /**协议 */
    @Field("schema")
    private String schema;
    /**请求体*/
    @Field("requestBody")
    private String requestBody;
    /**响应体*/
    @Field("responseData")
    private String responseData;
    /**请求ip*/
    @Field("ip")
    private String ip;
    /**请求时间*/
    @Field("requestTime")
    private Date requestTime;
    /**响应时间*/
    @Field("responseTime")
    private Date responseTime;
    /**执行时间*/
    @Field("executeTime")
    private long executeTime;

}
