classify.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. HasChild int `description:"是否有子分类0:下面没有子分类,1:下面有子分类"`
  21. Child []*ClassifyView `description:"子分类"`
  22. }
  23. type ClassifyDetail struct {
  24. ClassifyId int `description:"分类id"`
  25. ClassifyName string `description:"分类名称"`
  26. Sort int `json:"-"`
  27. ParentId int `description:"父级分类id"`
  28. CreateTime time.Time `description:"创建时间"`
  29. ModifyTime time.Time `description:"修改时间"`
  30. Abstract string `description:"栏目简介"`
  31. Descript string `description:"分享描述"`
  32. ReportAuthor string `description:"栏目作者"`
  33. AuthorDescript string `description:"作者简介"`
  34. ColumnImgUrl string `description:"栏目配图"`
  35. HeadImgUrl string `description:"头部banner"`
  36. AvatarImgUrl string `description:"头像"`
  37. ReportImgUrl string `description:"报告配图"`
  38. HomeImgUrl string `description:"首页配图"`
  39. Stage int `description:"最新期数"`
  40. }