package com.seer.teach.admin.request;

import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 题库请求参数
 * </p>
 *
 * @author Lingma
 * @since 2025-10-27
 */
@Data
@Schema(description = "题库请求参数")
public class BankQuestionsReq {

    @Schema(description = "知识点ID")
    @NotNull(message = "知识点ID不能为空")
    private Integer knowId;

    @Schema(description = "题目")
    @NotBlank(message = "题目不能为空")
    private String title;

    @Schema(description = "解题过程")
    private String solution;

    @Schema(description = "答案")
    private String answer;

    @Schema(description = "完整富文本内容（题目 选项 答案 解题过程）")
    private String html;

    @Schema(description = "完整富文本内容（题目 选项 答案 解题过程）")
    private String questionHtml;

    @Schema(description = "0其他题型  1单选选择题 2多选选择题 3问答题 4判断题")
    @NotNull(message = "题型不能为空")
    private Integer type;

    @Schema(description = "题目难易度系数（0.00-5.00，越大越难）")
    private BigDecimal difficulty;

    @Schema(description = "状态：0草稿 1启用 2停用")
    private Integer status;

    private Integer isChecked;

    @Schema(description = "排序字段")
    private Integer sort;

    @Schema(description = "选项")
    private List<Option> options;

    @Data
    public static class Option {

        private Integer id;

    	@Schema(description = "排序")
    	private Integer sort;

    	@Schema(description = "选项内容")
    	private String content;
    }

}