activity.go 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. package model
  2. import (
  3. "go-common/library/time"
  4. )
  5. // CActivity creative activity
  6. type CActivity struct {
  7. ID int64 `json:"id"`
  8. Name string `json:"name" form:"name" validate:"required"`
  9. Creator string `json:"creator"`
  10. SignedStart time.Time `json:"signed_start" form:"signed_start" validate:"required"`
  11. SignedEnd time.Time `json:"signed_end" form:"signed_end" validate:"required"`
  12. SignUp int `json:"sign_up" form:"sign_up" default:"0"` // 需要报名 0不需要,1需要
  13. SignUpStart time.Time `json:"sign_up_start" form:"sign_up_start" validate:"required"`
  14. SignUpEnd time.Time `json:"sign_up_end" form:"sign_up_end" validate:"required"`
  15. Object int `json:"object" form:"object" validate:"required"` // 1:uid, 2:avid
  16. UploadStart time.Time `json:"upload_start" form:"upload_start" validate:"required"`
  17. UploadEnd time.Time `json:"upload_end" form:"upload_end" validate:"required"`
  18. WinType int `json:"win_type" form:"win_type" validate:"required"` // 1:达标型,2:排序型
  19. RequireItems string `json:"require_items" form:"require_items" validate:"required"` // 1:点赞,2:分享,3:播放,4:评论,5:弹幕, 多个用","分割
  20. RequireValue int64 `json:"require_value" form:"require_value" validate:"required"`
  21. StatisticsStart time.Time `json:"statistics_start" form:"statistics_start" validate:"required"`
  22. StatisticsEnd time.Time `json:"statistics_end" form:"statistics_end" validate:"required"`
  23. BonusType int `json:"bonus_type" form:"bonus_type" validate:"required"` // 1:平分,2:各得
  24. BonusMoney []int64 `json:"bonus_money" form:"bonus_money,split" validate:"required"` // (多个","分割)
  25. BonusTime time.Time `json:"bonus_time" form:"bonus_time" validate:"required"`
  26. ProgressFrequency int `json:"progress_frequency" form:"progress_frequency" validate:"required"` // 进展更新频率 1:每天 2:每周
  27. UpdatePage int `json:"update_page" form:"update_page" default:"0"` // 更新活动页 0:否 1:是
  28. ProgressStart time.Time `json:"progress_start" form:"progress_start" validate:"required"`
  29. ProgressEnd time.Time `json:"progress_end" form:"progress_end" validate:"required"`
  30. ProgressSync int `json:"progress_sync" form:"progress_sync" default:"0"` // 进展同步 1共有,2已有,3共有/已有
  31. BonusQuery int `json:"bonus_query" form:"bonus_query" default:"0"` // 开奖查询 0:否 1:是
  32. BonusQuerStart time.Time `json:"bonus_query_start" form:"bonus_query_start" validate:"required"`
  33. BonusQueryEnd time.Time `json:"bonus_query_end" form:"bonus_query_end" validate:"required"`
  34. Background string `json:"background" form:"background" validate:"required"`
  35. WinDesc string `json:"win_desc" form:"win_desc" validate:"required"`
  36. UnwinDesc string `json:"unwin_desc" form:"unwin_desc" validate:"required"`
  37. Details string `json:"details" form:"details" validate:"required"`
  38. State int `json:"state"` // 活动状态 0未开始,1已开始,2已结束
  39. Enrolment int `json:"enrolment"` // 报名人数
  40. WinNum int `json:"win_num"` // 中奖人数
  41. }
  42. // BonusRank bonus rank
  43. type BonusRank struct {
  44. ID int64
  45. Rank int
  46. Money int64
  47. }
  48. // UpActivity up activity
  49. type UpActivity struct {
  50. MID int64 `json:"mid"`
  51. AIDs string `json:"aids"`
  52. AIDNum int64 `json:"aid_num"`
  53. Nickname string `json:"nickname"`
  54. Bonus int64 `json:"bonus"`
  55. Rank int `json:"rank"`
  56. SignUpTime time.Time `json:"sign_up_time"`
  57. SuccessTime time.Time `json:"success_time"`
  58. State int `json:"state"`
  59. }