package com.yolo.keyboard.controller.admin.usercalllog.vo;

import lombok.*;
import java.util.*;
import io.swagger.v3.oas.annotations.media.Schema;
import com.yolo.keyboard.framework.common.pojo.PageParam;
import org.springframework.format.annotation.DateTimeFormat;
import java.time.LocalDateTime;

import static com.yolo.keyboard.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;

@Schema(description = "管理后台 - 用户每次调用日志（用于记录token、模型、耗时、成功率等）分页 Request VO")
@Data
public class KeyboardUserCallLogPageReqVO extends PageParam {

    @Schema(description = "用户ID", example = "22552")
    private Long userId;

    @Schema(description = "幂等请求ID，避免重试导致重复记录", example = "12645")
    private String requestId;

    @Schema(description = "调用功能来源")
    private String feature;

    @Schema(description = "调用的模型名称")
    private String model;

    @Schema(description = "输入token数")
    private Integer inputTokens;

    @Schema(description = "输出token数")
    private Integer outputTokens;

    @Schema(description = "总token数（input+output）")
    private Integer totalTokens;

    @Schema(description = "调用是否成功")
    private Boolean success;

    @Schema(description = "调用耗时（毫秒）")
    private Integer latencyMs;

    @Schema(description = "失败错误码（可空）")
    private String errorCode;

    @Schema(description = "调用记录创建时间")
    private LocalDateTime createdAt;

    @Schema(description = "生成 id", example = "2813")
    private String genId;

}