dt_content.go 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. package daytask
  2. // DtNotice 公告表
  3. type DtNotice struct {
  4. Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:公告ID"`
  5. Title string `json:"title" gorm:"column:title;type:varchar(128);not null;comment:标题"`
  6. TitleVi string `json:"titleVi" gorm:"column:title_vi;type:varchar(128);comment:标题(越南语)"`
  7. Content string `json:"content" gorm:"column:content;type:text;comment:内容"`
  8. ContentVi string `json:"contentVi" gorm:"column:content_vi;type:text;comment:内容(越南语)"`
  9. Type int8 `json:"type" gorm:"column:type;type:tinyint;default:1;index:idx_type;comment:类型: 1=系统公告 2=活动公告"`
  10. IsPopup int8 `json:"isPopup" gorm:"column:is_popup;type:tinyint;default:0;comment:是否弹窗: 0=否 1=是"`
  11. IsTop int8 `json:"isTop" gorm:"column:is_top;type:tinyint;default:0;comment:是否置顶: 0=否 1=是"`
  12. StartTime int64 `json:"startTime" gorm:"column:start_time;type:bigint;comment:开始时间"`
  13. EndTime int64 `json:"endTime" gorm:"column:end_time;type:bigint;comment:结束时间"`
  14. Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;index:idx_status;comment:状态: 0=禁用 1=启用"`
  15. Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"`
  16. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
  17. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
  18. }
  19. func (*DtNotice) TableName() string {
  20. return "dt_notice"
  21. }
  22. func NewDtNotice() *DtNotice {
  23. return &DtNotice{}
  24. }
  25. // DtBanner Banner表
  26. type DtBanner struct {
  27. Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:BannerID"`
  28. Title string `json:"title" gorm:"column:title;type:varchar(128);not null;comment:标题"`
  29. Image string `json:"image" gorm:"column:image;type:varchar(255);not null;comment:图片"`
  30. ImageVi string `json:"imageVi" gorm:"column:image_vi;type:varchar(255);comment:图片(越南语版)"`
  31. LinkType int8 `json:"linkType" gorm:"column:link_type;type:tinyint;default:0;comment:链接类型: 0=无 1=内部页面 2=外部链接 3=公告详情"`
  32. LinkUrl string `json:"linkUrl" gorm:"column:link_url;type:varchar(512);comment:链接地址"`
  33. Position string `json:"position" gorm:"column:position;type:varchar(32);default:home;index:idx_position;comment:位置: home/task/activity"`
  34. StartTime int64 `json:"startTime" gorm:"column:start_time;type:bigint;comment:开始时间"`
  35. EndTime int64 `json:"endTime" gorm:"column:end_time;type:bigint;comment:结束时间"`
  36. Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;index:idx_status;comment:状态: 0=禁用 1=启用"`
  37. Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"`
  38. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
  39. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
  40. }
  41. func (*DtBanner) TableName() string {
  42. return "dt_banner"
  43. }
  44. func NewDtBanner() *DtBanner {
  45. return &DtBanner{}
  46. }
  47. // DtHelpCategory 帮助分类表
  48. type DtHelpCategory struct {
  49. Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:分类ID"`
  50. Name string `json:"name" gorm:"column:name;type:varchar(64);not null;comment:分类名称"`
  51. NameVi string `json:"nameVi" gorm:"column:name_vi;type:varchar(64);comment:分类名称(越南语)"`
  52. Icon string `json:"icon" gorm:"column:icon;type:varchar(255);comment:图标"`
  53. Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=禁用 1=启用"`
  54. Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"`
  55. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
  56. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
  57. }
  58. func (*DtHelpCategory) TableName() string {
  59. return "dt_help_category"
  60. }
  61. func NewDtHelpCategory() *DtHelpCategory {
  62. return &DtHelpCategory{}
  63. }
  64. // DtHelp 帮助中心表
  65. type DtHelp struct {
  66. Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:帮助ID"`
  67. CategoryId int64 `json:"categoryId" gorm:"column:category_id;type:bigint;default:0;index:idx_category_id;comment:分类ID"`
  68. Title string `json:"title" gorm:"column:title;type:varchar(128);not null;comment:标题"`
  69. TitleVi string `json:"titleVi" gorm:"column:title_vi;type:varchar(128);comment:标题(越南语)"`
  70. Content string `json:"content" gorm:"column:content;type:text;comment:内容"`
  71. ContentVi string `json:"contentVi" gorm:"column:content_vi;type:text;comment:内容(越南语)"`
  72. ViewCount int `json:"viewCount" gorm:"column:view_count;type:int;default:0;comment:浏览次数"`
  73. Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=禁用 1=启用"`
  74. Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"`
  75. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
  76. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
  77. }
  78. func (*DtHelp) TableName() string {
  79. return "dt_help"
  80. }
  81. func NewDtHelp() *DtHelp {
  82. return &DtHelp{}
  83. }
  84. // DtCustomerService 客服配置表
  85. type DtCustomerService struct {
  86. Id int64 `json:"id" gorm:"column:id;type:bigint;primarykey;comment:ID"`
  87. Name string `json:"name" gorm:"column:name;type:varchar(64);not null;comment:客服名称"`
  88. Type string `json:"type" gorm:"column:type;type:varchar(32);not null;comment:类型: telegram/zalo/whatsapp/link"`
  89. Account string `json:"account" gorm:"column:account;type:varchar(128);not null;comment:账号/链接"`
  90. Qrcode string `json:"qrcode" gorm:"column:qrcode;type:varchar(255);comment:二维码"`
  91. WorkTime string `json:"workTime" gorm:"column:work_time;type:varchar(64);comment:工作时间"`
  92. Status int8 `json:"status" gorm:"column:status;type:tinyint;default:1;comment:状态: 0=禁用 1=启用"`
  93. Sort int `json:"sort" gorm:"column:sort;type:int;default:0;comment:排序"`
  94. CreatedAt int64 `json:"createdAt" gorm:"column:created_at;type:bigint;autoCreateTime;comment:创建时间"`
  95. UpdatedAt int64 `json:"updatedAt" gorm:"column:updated_at;type:bigint;autoUpdateTime;comment:更新时间"`
  96. }
  97. func (*DtCustomerService) TableName() string {
  98. return "dt_customer_service"
  99. }
  100. func NewDtCustomerService() *DtCustomerService {
  101. return &DtCustomerService{}
  102. }