classify.go 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package models
  2. import (
  3. "time"
  4. )
  5. type Classify struct {
  6. Id int `description:"分类id"`
  7. ClassifyName string `description:"分类名称"`
  8. Sort int `json:"-"`
  9. ParentId int `description:"父级分类id"`
  10. CreateTime time.Time `description:"创建时间"`
  11. ModifyTime time.Time `description:"修改时间"`
  12. Level int `description:"分类层级"`
  13. }
  14. type ClassifyView struct {
  15. Id int `description:"分类id"`
  16. ClassifyName string `description:"分类名称"`
  17. Sort int `json:"-"`
  18. ParentId int `description:"父级分类id"`
  19. Level int `description:"分类层级"`
  20. Child []*ClassifyView `description:"子分类"`
  21. }
  22. type ClassifyDetail struct {
  23. ClassifyId int `description:"分类id"`
  24. ClassifyName string `description:"分类名称"`
  25. Sort int `json:"-"`
  26. ParentId int `description:"父级分类id"`
  27. CreateTime time.Time `description:"创建时间"`
  28. ModifyTime time.Time `description:"修改时间"`
  29. Abstract string `description:"栏目简介"`
  30. Descript string `description:"分享描述"`
  31. ReportAuthor string `description:"栏目作者"`
  32. AuthorDescript string `description:"作者简介"`
  33. ColumnImgUrl string `description:"栏目配图"`
  34. HeadImgUrl string `description:"头部banner"`
  35. AvatarImgUrl string `description:"头像"`
  36. ReportImgUrl string `description:"报告配图"`
  37. HomeImgUrl string `description:"首页配图"`
  38. Stage int `description:"最新期数"`
  39. }