package cn.meowrain.aioj.backend.question.dto.req;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;

/**
 * 编辑题目请求 DTO（用户使用）
 */
@Data
@Schema(description = "编辑题目请求-用户用")
public class QuestionEditRequestDTO implements Serializable {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "题目标题", example = "两数之和")
	private String title;

	@Schema(description = "题目描述", example = "给定一个整数数组 nums 和一个整数目标值 target...")
	private String content;

	@Schema(description = "难度等级", example = "easy", allowableValues = {"easy", "medium", "hard"})
	private String difficulty;

	@Schema(description = "标签列表", example = "[\"数组\", \"哈希表\"]")
	private List<String> tags;

	@Schema(description = "题目答案", example = "class Solution {\n    public int[] twoSum(int[] nums, int target) {\n        ...\n    }\n}")
	private String answer;

	@Schema(description = "判题用例（JSON格式）", example = "[{\"input\":\"[2,7,11,15]\\n9\",\"output\":\"[0,1]\"}]")
	private List<JudgeCase> judgeCase;

	@Schema(description = "判题配置（JSON格式）", example = "{\"timeLimit\":3000,\"memoryLimit\":256}")
	private JudgeConfig judgeConfig;
}
