package top.tqx.demo_1.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

@Data
public class ExamPaperPreviewResponse implements Serializable {

    private static final long serialVersionUID = 1L;

    @JsonProperty("paper_id")
    private String paperId;

    @JsonProperty("paper_title")
    private String paperTitle;

    @JsonProperty("description")
    private String description;

    @JsonProperty("total_score")
    private BigDecimal totalScore;

    @JsonProperty("question_count")
    private Integer questionCount;

    @JsonProperty("duration")
    private Integer duration;

    @JsonProperty("generated_at")
    private LocalDateTime generatedAt;

    @JsonProperty("permission_scope")
    private String permissionScope;

    @JsonProperty("warnings")
    private Map<String, String> warnings;

    private List<ExamPaperQuestionDetail> questions;

    @Data
    public static class ExamPaperQuestionDetail implements Serializable {
        private static final long serialVersionUID = 1L;

        @JsonProperty("question_id")
        private String questionId;

        @JsonProperty("question_type")
        private String questionType;

        @JsonProperty("question_type_name")
        private String questionTypeName;

        private Integer difficulty;

        @JsonProperty("difficulty_name")
        private String difficultyName;

        private BigDecimal score;

        private QuestionContent content;

        @JsonProperty("document_name")
        private String documentName;

        @JsonProperty("knowledge_base_path")
        private String knowledgeBasePath;

        @JsonProperty("source_context")
        private String sourceContext;

        @JsonProperty("page_numbers")
        private List<Integer> pageNumbers;
    }

    @Data
    public static class QuestionContent implements Serializable {
        private static final long serialVersionUID = 1L;

        private String stem;

        private Object options;

        private Object answer;

        private String explanation;

        private Object data;
    }
}