entity.go 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. package yb_price_driven
  2. import (
  3. "time"
  4. )
  5. // YbPriceDriven 研报-价格驱动表
  6. type YbPriceDriven struct {
  7. PriceDrivenID int `gorm:"primaryKey;column:price_driven_id;type:int(10) unsigned;not null" json:"-"`
  8. ChartPermissionID int `gorm:"index:idx_chart_permission_id;column:chart_permission_id;type:int(10) unsigned;not null;default:0" json:"chartPermissionId"` // 品种权限ID
  9. MainVariable string `gorm:"column:main_variable;type:varchar(255);not null;default:''" json:"mainVariable"` // 关键变量
  10. CoreDrivenType int `gorm:"column:core_driven_type;type:tinyint(4) unsigned;not null;default:0" json:"coreDrivenType"` // 核心驱动类型 0-多 1-空
  11. CoreDrivenContent string `gorm:"column:core_driven_content;type:varchar(255);not null;default:''" json:"coreDrivenContent"` // 核心驱动内容
  12. CoreContent string `gorm:"column:core_content;type:longtext" json:"coreContent"` // 核心内容
  13. LastUpdateAdminID int `gorm:"column:last_update_admin_id;type:int(10) unsigned;not null;default:0" json:"lastUpdateAdminId"` // 最后一次更新人ID
  14. LastUpdateAdminName string `gorm:"column:last_update_admin_name;type:varchar(30);not null;default:''" json:"lastUpdateAdminName"` // 最后一次更新人姓名
  15. LastThsMsgTime time.Time `gorm:"column:last_ths_msg_time;type:datetime" json:"lastThsMsgTime"` // 最后一次推送客群消息的时间
  16. LastTemplateMsgTime time.Time `gorm:"column:last_template_msg_time;type:datetime" json:"lastTemplateMsgTime"` // 最后一次推送模板消息的时间
  17. CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 创建时间
  18. ModifyTime time.Time `gorm:"column:modify_time;type:datetime;default:CURRENT_TIMESTAMP" json:"modifyTime"` // 修改时间
  19. }
  20. // TableName get sql table name.获取数据库表名
  21. func (m *YbPriceDriven) TableName() string {
  22. return "yb_price_driven"
  23. }
  24. // YbPriceDrivenColumns get sql column name.获取数据库列名
  25. var YbPriceDrivenColumns = struct {
  26. PriceDrivenID string
  27. ChartPermissionID string
  28. MainVariable string
  29. CoreDrivenType string
  30. CoreDrivenContent string
  31. CoreContent string
  32. LastUpdateAdminID string
  33. LastUpdateAdminName string
  34. LastThsMsgTime string
  35. LastTemplateMsgTime string
  36. CreateTime string
  37. ModifyTime string
  38. }{
  39. PriceDrivenID: "price_driven_id",
  40. ChartPermissionID: "chart_permission_id",
  41. MainVariable: "main_variable",
  42. CoreDrivenType: "core_driven_type",
  43. CoreDrivenContent: "core_driven_content",
  44. CoreContent: "core_content",
  45. LastUpdateAdminID: "last_update_admin_id",
  46. LastUpdateAdminName: "last_update_admin_name",
  47. LastThsMsgTime: "last_ths_msg_time",
  48. LastTemplateMsgTime: "last_template_msg_time",
  49. CreateTime: "create_time",
  50. ModifyTime: "modify_time",
  51. }