feat: 添加响应体对象
This commit is contained in:
@@ -5,14 +5,96 @@ import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 题目响应 DTO
|
||||
* <p>
|
||||
* 用于返回给前端的题目详情信息
|
||||
* </p>
|
||||
*/
|
||||
@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<String> 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;
|
||||
}
|
||||
Reference in New Issue
Block a user