refactor(model): 重构数据模型结构
- 将 Word 和 MemoryRecord 结构体拆分为独立文件 - 创建 request 包用于存放请求结构体 - 创建 response 包用于存放响应结构体 - 将 YoudaoResponse 移至独立模型文件 - 更新服务层接口参数类型为新的请求响应结构体 - 修改处理器层导入路径以使用新包结构
This commit is contained in:
10
memora-api/internal/response/word.go
Normal file
10
memora-api/internal/response/word.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package response
|
||||
|
||||
import "memora-api/internal/model"
|
||||
|
||||
type ReviewResult struct {
|
||||
Word *model.Word `json:"word"`
|
||||
Correct bool `json:"correct"`
|
||||
Answer string `json:"answer"`
|
||||
CorrectAns string `json:"correct_ans,omitempty"`
|
||||
}
|
||||
Reference in New Issue
Block a user