Skip to content

关于星辰英语本的 #300

@CN-HuanTian

Description

@CN-HuanTian

docs/course/starbook/第四章-单词管理/4.4.编辑单词.md
我发现在标题添加Api的举例中,List结构体的ProficiencyLevel字段类型是model.ProficiencyLevel
而在4.3.新增单词.md中的CreateReq4.4.编辑单词.mdUpdateReq结构体使用的是该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"`  
}
Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions