content_repo.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. package model
  2. import (
  3. "go-common/library/time"
  4. )
  5. // ContentRepo def.
  6. type ContentRepo struct {
  7. ID int64 `json:"id"`
  8. Title string `json:"title"`
  9. Subtitle string `json:"subtitle"`
  10. Desc string `json:"desc"`
  11. Cover string `json:"cover"`
  12. SeasonID int `json:"season_id"`
  13. CID int `json:"cid" gorm:"column:cid"`
  14. EPID int `json:"epid" gorm:"column:epid"`
  15. MenuID int `json:"menu_id"`
  16. State int `json:"state"`
  17. Valid int `json:"valid"`
  18. PayStatus int `json:"pay_status"`
  19. IsDeleted int `json:"is_deleted"`
  20. AuditTime int `json:"audit_time"`
  21. Ctime time.Time `json:"ctime"`
  22. Mtime time.Time `json:"mtime_nb,omitempty"`
  23. MtimeFormat string `json:"mtime"`
  24. InjectTime time.Time `json:"inject_time"`
  25. // InjectTimeFormat string `json:"inject_time"`
  26. Reason string `json:"reason"`
  27. SeasonTitle string `json:"season_title" gorm:"column:season_title"`
  28. Category int8 `json:"category" gorm:"column:category"`
  29. }
  30. // TableName tv_content
  31. func (*ContentRepo) TableName() string {
  32. return "tv_content"
  33. }
  34. // ContentRepoPager def.
  35. type ContentRepoPager struct {
  36. TotalCount int64 `json:"total_count"`
  37. Pn int `json:"pn"`
  38. Ps int `json:"ps"`
  39. Items []*ContentRepo `json:"items"`
  40. }