From 17f58a7b4547ade6f459293bc04e78a67c03f3e8 Mon Sep 17 00:00:00 2001 From: meowrain Date: Wed, 21 Jan 2026 22:55:14 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E4=BD=93=E5=AF=B9=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/resp/QuestionResponseDTO.java | 88 ++++++++++++++++++- 1 file changed, 85 insertions(+), 3 deletions(-) diff --git a/aioj-backend-question-service/src/main/java/cn/meowrain/aioj/backend/question/dto/resp/QuestionResponseDTO.java b/aioj-backend-question-service/src/main/java/cn/meowrain/aioj/backend/question/dto/resp/QuestionResponseDTO.java index 4a26ad7..012489e 100644 --- a/aioj-backend-question-service/src/main/java/cn/meowrain/aioj/backend/question/dto/resp/QuestionResponseDTO.java +++ b/aioj-backend-question-service/src/main/java/cn/meowrain/aioj/backend/question/dto/resp/QuestionResponseDTO.java @@ -5,14 +5,96 @@ import lombok.Data; import java.io.Serializable; import java.util.Date; +import java.util.List; /** * 题目响应 DTO + *

+ * 用于返回给前端的题目详情信息 + *

*/ @Data -@Schema(description = "题目响应") +@Schema(description = "题目详情响应对象") public class QuestionResponseDTO implements Serializable { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; -} + /** + * 题目ID + */ + @Schema(description = "题目ID", example = "1789123456789012345") + private Long id; + + /** + * 题目标题 + */ + @Schema(description = "题目标题", example = "A + B 问题") + private String title; + + /** + * 题目详细内容/描述 + */ + @Schema(description = "题目详细内容/描述", example = "请输入两个整数 A 和 B,计算它们的和...") + private String content; + + /** + * 难度等级:easy/medium/hard + */ + @Schema(description = "难度等级 (easy/medium/hard)", example = "easy") + private String difficulty; + + /** + * 标签列表 + */ + @Schema(description = "标签列表", example = "[\"栈\", \"数组\", \"算法\"]") + private List tags; + + /** + * 通过数 + */ + @Schema(description = "通过数", example = "100") + private Integer acceptedCount; + + /** + * 总提交数 + */ + @Schema(description = "总提交数", example = "500") + private Integer submitCount; + + /** + * 判题配置(JSON格式字符串) + * 包含 timeLimit, memoryLimit, stackLimit 等 + */ + @Schema(description = "判题配置 (JSON字符串,包含时间限制、内存限制等)", example = "{\"timeLimit\": 1000, \"memoryLimit\": 256}") + private String judgeConfig; + + /** + * 点赞数 + */ + @Schema(description = "点赞数", example = "20") + private Integer thumbCount; + + /** + * 收藏数 + */ + @Schema(description = "收藏数", example = "5") + private Integer favourCount; + + /** + * 创建者/出题人 ID + */ + @Schema(description = "创建者/出题人 ID", example = "123456") + private Long userId; + + /** + * 创建时间 + */ + @Schema(description = "创建时间", example = "2024-01-20 12:00:00") + private Date createTime; + + /** + * 更新时间 + */ + @Schema(description = "更新时间", example = "2024-01-21 10:30:00") + private Date updateTime; +} \ No newline at end of file