dt_help.go 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. package entity
  2. // DtHelpCategory 帮助分类表
  3. type DtHelpCategory struct {
  4. MysqlBaseModel
  5. Name string `json:"name" gorm:"type:varchar(64);comment:分类名称"`
  6. NameVi string `json:"nameVi" gorm:"type:varchar(64);comment:分类名称(越南语)"`
  7. Icon string `json:"icon" gorm:"type:varchar(255);comment:分类图标"`
  8. Status int8 `json:"status" gorm:"default:1;comment:状态: 0=禁用 1=启用"`
  9. Sort int `json:"sort" gorm:"default:0;comment:排序"`
  10. }
  11. func (*DtHelpCategory) TableName() string {
  12. return "dt_help_category"
  13. }
  14. func (*DtHelpCategory) Comment() string {
  15. return "帮助分类表"
  16. }
  17. func NewDtHelpCategory() *DtHelpCategory {
  18. return &DtHelpCategory{}
  19. }
  20. // DtHelp 帮助文档表
  21. type DtHelp struct {
  22. MysqlBaseModel
  23. CategoryId int64 `json:"categoryId" gorm:"index:idx_category_id;comment:分类ID"`
  24. Title string `json:"title" gorm:"type:varchar(128);comment:标题"`
  25. TitleVi string `json:"titleVi" gorm:"type:varchar(128);comment:标题(越南语)"`
  26. Content string `json:"content" gorm:"type:text;comment:内容"`
  27. ContentVi string `json:"contentVi" gorm:"type:text;comment:内容(越南语)"`
  28. ViewCount int `json:"viewCount" gorm:"default:0;comment:浏览次数"`
  29. Status int8 `json:"status" gorm:"default:1;comment:状态: 0=禁用 1=启用"`
  30. Sort int `json:"sort" gorm:"default:0;comment:排序"`
  31. }
  32. func (*DtHelp) TableName() string {
  33. return "dt_help"
  34. }
  35. func (*DtHelp) Comment() string {
  36. return "帮助文档表"
  37. }
  38. func NewDtHelp() *DtHelp {
  39. return &DtHelp{}
  40. }