互动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
4.2 KiB

5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
5 years ago
  1. package models
  2. import (
  3. "time"
  4. )
  5. const ActivityTableName = TableNamePrefix + "activity"
  6. //互动活动
  7. type Activity struct {
  8. Model `xorm:"extends"`
  9. //Id int `json:"id" xorm:"not null pk autoincr INT(11)"`
  10. //IsDelete bool `json:"is_delete" xorm:"not null default(0) comment('删除') TINYINT(1)" description:"删除"`
  11. //CreatedAt time.Time `json:"-" xorm:"not null created comment('创建时间') DATETIME" description:"创建时间"`
  12. //UpdatedAt time.Time `json:"-" xorm:"not null updated comment('更新时间') DATETIME" description:"更新时间"`
  13. CustomerId int `json:"customer_id" xorm:"not null default(0) comment('customer_id, 创建客户id') INT(11)"`
  14. ArchId int `json:"arch_id" xorm:"not null default 0 comment('归档id') INT(11)"`
  15. Services []*ActivityModuleService `json:"services,omitempty" xorm:"-" description:"主活动下的服务"`
  16. AreaStores []*AreaStore `json:"area_stores,omitempty" xorm:"-" description:"地区"`
  17. BarrageStatus string `json:"barrage_status,omitempty" xorm:"-" description:"弹幕服务状态"`
  18. BullyScreenStatus string `json:"bully_screen_status,omitempty" xorm:"-" description:"霸屏状态"`
  19. RewardStatus string `json:"reward_status,omitempty" xorm:"-" description:"打赏状态"`
  20. UpperWallStatus string `json:"upper_wall_status,omitempty" xorm:"-" description:"上墙状态"`
  21. Name string `json:"name" xorm:"not null comment('主活动名字') VARCHAR(255)"`
  22. Classification string `json:"classification" xorm:"not null comment('互动分类') VARCHAR(255)"`
  23. Status string `json:"status" xorm:"not null default('未开始') comment('状态[未开始,进行中,已结束]') VARCHAR(128)"`
  24. RehearsalId int `json:"rehearsal_id" xorm:"not null default(0) comment('0正式、1彩排中的id') INT(11)"`
  25. Province string `json:"province" xorm:"not null default('') comment('省') VARCHAR(128)" description:"省"`
  26. City string `json:"city" xorm:"not null default('') comment('省') VARCHAR(128)" description:"市"`
  27. StartTime time.Time `json:"start_time" xorm:"not null default('1970-01-01 08:00:00') comment('互动开始时间') DATETIME"`
  28. EndTime time.Time `json:"end_time" xorm:"not null default('1970-01-01 08:00:00') comment('互动开始时间') DATETIME"`
  29. PublicAccount string `json:"public_account" xorm:"not null default('') comment('公众号') VARCHAR(255)" description:"公众账号"`
  30. ContactNumber string `json:"contact_number" xorm:"not null default('') comment('联系方式') VARCHAR(255)" description:"联系电话"`
  31. EstimatedNum int `json:"estimated_num" xorm:"not null default(0) comment('预计与会人数') INT(11)" description:"预计人数"`
  32. HdMode string `json:"hd_mode" xorm:"not null default('') comment('互动模式') VARCHAR(128)"`
  33. MoreAreaMode string `json:"more_area_mode" xorm:"not null default('关闭') comment('多地区模式[开启,关闭]') VARCHAR(255)" description:"多地区模式[开启,关闭]"`
  34. PhoneBgUrl string `json:"phone_bg_url" xorm:"not null default('') comment('手机通用背景') VARCHAR(255)"`
  35. PhoneBgSwitch string `json:"phone_bg_switch" xorm:"not null default('关闭') comment('手机通用背景开关') VARCHAR(255)"`
  36. MaxBgUrl string `json:"max_bg_url" xorm:"not null default('') comment('大屏通用背景') VARCHAR(255)" description:"大屏通用背景"`
  37. MaxBgSwitch string `json:"max_bg_switch" xorm:"not null default('关闭') comment('大屏通用背景开关')" description:"大屏通用背景开关"`
  38. }
  39. func (t *Activity) TableName() string {
  40. return ActivityTableName
  41. }
  42. func (t *Activity) Alias(name string) string {
  43. return Alias(t, name)
  44. }