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

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

/**
 * 题目提交请求 DTO
 */
@Data
@Schema(description = "题目提交请求")
public class QuestionSubmitRequestDTO {

	@Schema(description = "题目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
	@NotNull(message = "题目ID不能为空")
	private Long questionId;

	@Schema(description = "编程语言", requiredMode = Schema.RequiredMode.REQUIRED, example = "java", allowableValues = {"java", "cpp", "python", "go", "javascript", "c", "csharp", "rust", "php", "swift", "kotlin", "typescript", "ruby", "shell"})
	@NotBlank(message = "编程语言不能为空")
	private String language;

	@Schema(description = "用户代码", requiredMode = Schema.RequiredMode.REQUIRED, example = "class Solution {\n    public int[] twoSum(int[] nums, int target) {\n        ...\n    }\n}")
	@NotBlank(message = "代码不能为空")
	private String code;
}
