-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
在docs/course/starbook/第四章-单词管理/4.4.编辑单词.md中
我发现在标题添加Api的举例中,List结构体的ProficiencyLevel字段类型是model.ProficiencyLevel
而在4.3.新增单词.md中的CreateReq和4.4.编辑单词.md的UpdateReq结构体使用的是该Api下定义的ProficiencyLevel类型
同时我的IDE也报错未解析的类型 'mode'
请问这么定义是有意为之还是笔误
以下是文档中的举例:
...
type List struct {
Id uint `json:"id"`
Word string `json:"word"`
Definition string `json:"definition"`
ProficiencyLevel model.ProficiencyLevel `json:"proficiencyLevel"`
}
type ListReq struct {
g.Meta `path:"words" method:"get" sm:"列表" tags:"单词"`
Word string `json:"word" v:"length:1,100" dc:"模糊查询单词"`
Page int `json:"page" v:"min:1" dc:"页码,默认1"`
Size int `json:"size" v:"between:1,100" dc:"每页数量,默认10"`
}
type ListRes struct {
List []List `json:"list"`
Total uint `json:"total"`
}

Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels