words.go 965 B

1234567891011121314151617181920212223242526
  1. package v1
  2. import "github.com/gogf/gf/v2/frame/g"
  3. type ProficiencyLevel uint
  4. const (
  5. ProficiencyLevel1 ProficiencyLevel = iota + 1
  6. ProficiencyLevel2
  7. ProficiencyLevel3
  8. ProficiencyLevel4
  9. ProficiencyLevel5
  10. )
  11. type CreateReq struct {
  12. g.Meta `path:"words" method:"post" sm:"创建" tags:"单词"`
  13. Word string `json:"word" v:"required|length:1,100" dc:"单词"`
  14. Definition string `json:"definition" v:"required|length:1,300" dc:"单词定义"`
  15. ExampleSentence string `json:"example_sentence" v:"required|length:1,300" dc:"例句"`
  16. ChineseTranslation string `json:"chinese_translation" v:"required|length:1,300" dc:"中文翻译"`
  17. Pronunciation string `json:"pronunciation" v:"required|length:1,100" dc:"发音"`
  18. ProficiencyLevel ProficiencyLevel `json:"proficiency_level" v:"required|between:1,5" dc:"熟练度,1最低,5最高"`
  19. }
  20. type CreateRes struct {
  21. }