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

import cn.meowrain.aioj.backend.question.dao.entity.Question;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

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

/**
 * 题目查询请求 DTO
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Schema(description = "题目查询请求")
public class QuestionQueryRequestDTO extends Page<Question> implements Serializable {

	@Serial
	private static final long serialVersionUID = 1L;

	@Schema(description = "题目ID", example = "1")
	private Long id;

	@Schema(description = "题目标题（模糊查询）", example = "两数之和")
	private String title;

	@Schema(description = "题目描述（模糊查询）", example = "给定一个整数数组")
	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 {...}")
	private String answer;

	@Schema(description = "创建者ID", example = "1")
	private Long userId;

	@Schema(description = "排序字段", example = "createTime")
	private String sortField;

	@Schema(description = "排序方向", example = "desc", allowableValues = {"asc", "desc"})
	private String sortOrder;
}
