package com.seer.teach.openapi.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import java.time.LocalDateTime;

import com.seer.teach.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * SN接口调用日志表
 * </p>
 *
 * @author Wang
 * @since 2025-10-31 13:31:24
 */
@Getter
@Setter
@TableName("open_sn_call_logs")
@Schema(name = "SnCallLogsEntity对象", description = "SN接口调用日志表")
public class SnCallLogsEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @Schema(description = "会话ID")
    @TableField("session_id")
    private Integer sessionId;

    @Schema(description = "SN码")
    @TableField("sn_code")
    private String snCode;

    @Schema(description = "请求类型，如authorize、correct")
    @TableField("request_type")
    private String requestType;

    @Schema(description = "请求描述，如“授权请求”或“批改接口调用”")
    @TableField("request_desc")
    private String requestDesc;

    @Schema(description = "关键参数（如题目ID、用户ID等）")
    @TableField("key_parameters")
    private String keyParameters;

    @Schema(description = "请求参数JSON")
    @TableField("request")
    private String request;

    @Schema(description = "响应数据JSON")
    @TableField("response")
    private String response;

    @Schema(description = "状态：0成功 1失败")
    @TableField("`status`")
    private Integer status;

    @Schema(description = "错误信息")
    @TableField("error_message")
    private String errorMessage;

    @Schema(description = "接口耗时（毫秒）")
    @TableField("use_time")
    private Integer useTime;

    @Schema(description = "请求开始时间")
    @TableField("start_time")
    private LocalDateTime startTime;

    @Schema(description = "请求结束时间")
    @TableField("end_time")
    private LocalDateTime endTime;

}
