refactor(model): 重构数据模型结构

- 将 Word 和 MemoryRecord 结构体拆分为独立文件
- 创建 request 包用于存放请求结构体
- 创建 response 包用于存放响应结构体
- 将 YoudaoResponse 移至独立模型文件
- 更新服务层接口参数类型为新的请求响应结构体
- 修改处理器层导入路径以使用新包结构
This commit is contained in:
2026-02-26 14:44:40 +08:00
parent e5a245155a
commit c7003c1210
8 changed files with 102 additions and 96 deletions

View File

@@ -0,0 +1,11 @@
package request
type AddWordRequest struct {
Word string `json:"word" binding:"required"`
}
type ReviewAnswerRequest struct {
RecordID int64 `json:"record_id" binding:"required"`
Answer string `json:"answer" binding:"required"`
Mode string `json:"mode" binding:"required"` // spelling, en2cn, cn2en
}