entity.go 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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. VarietyTagID int `gorm:"index:idx_variety_tag_id;column:variety_tag_id;type:int(10) unsigned;not null;default:0" json:"varietyTagId"` // 标签ID
  9. VarietyTagName string `gorm:"column:variety_tag_name;type:varchar(10);not null;default:''" json:"varietyTagName"` // 标签名称
  10. MainVariable string `gorm:"column:main_variable;type:varchar(255);not null;default:''" json:"mainVariable"` // 关键变量
  11. CoreDrivenType int `gorm:"column:core_driven_type;type:tinyint(4) unsigned;not null;default:0" json:"coreDrivenType"` // 核心驱动类型 0-多 1-空
  12. CoreDrivenContent string `gorm:"column:core_driven_content;type:varchar(255);not null;default:''" json:"coreDrivenContent"` // 核心驱动内容
  13. CoreContent string `gorm:"column:core_content;type:longtext" json:"coreContent"` // 核心内容
  14. LastUpdateAdminID int `gorm:"column:last_update_admin_id;type:int(10) unsigned;not null;default:0" json:"lastUpdateAdminId"` // 最后一次更新人ID
  15. LastUpdateAdminName string `gorm:"column:last_update_admin_name;type:varchar(30);not null;default:''" json:"lastUpdateAdminName"` // 最后一次更新人姓名
  16. SendThsMsgTime time.Time `gorm:"column:send_ths_msg_time;type:datetime" json:"sendThsMsgTime"` // 最后一次推送客群消息的时间
  17. SendTemplateMsgTime time.Time `gorm:"column:send_template_msg_time;type:datetime" json:"sendTemplateMsgTime"` // 最后一次推送模板消息的时间
  18. ThsMsgState int `gorm:"column:ths_msg_state;type:tinyint(4) unsigned;not null;default:0" json:"thsMsgState"` // 同花顺推送状态:0-未推送 1-已推送
  19. TemplateMsgState int `gorm:"column:template_msg_state;type:tinyint(4) unsigned;not null;default:0" json:"templateMsgState"` // 模板消息推送状态:0-未推送 1-已推送
  20. PublishState int `gorm:"column:publish_state;type:tinyint(4) unsigned;not null;default:0" json:"publishState"` // 发布状态:0-未发布 1-已发布
  21. CreateTime time.Time `gorm:"column:create_time;type:datetime;default:CURRENT_TIMESTAMP" json:"createTime"` // 创建时间
  22. ModifyTime time.Time `gorm:"column:modify_time;type:datetime;default:CURRENT_TIMESTAMP" json:"modifyTime"` // 修改时间
  23. }
  24. // TableName get sql table name.获取数据库表名
  25. func (m *YbPriceDriven) TableName() string {
  26. return "yb_price_driven"
  27. }
  28. // YbPriceDrivenColumns get sql column name.获取数据库列名
  29. var YbPriceDrivenColumns = struct {
  30. PriceDrivenID string
  31. VarietyTagID string
  32. VarietyTagName string
  33. MainVariable string
  34. CoreDrivenType string
  35. CoreDrivenContent string
  36. CoreContent string
  37. LastUpdateAdminID string
  38. LastUpdateAdminName string
  39. SendThsMsgTime string
  40. SendTemplateMsgTime string
  41. ThsMsgState string
  42. TemplateMsgState string
  43. PublishState string
  44. CreateTime string
  45. ModifyTime string
  46. }{
  47. PriceDrivenID: "price_driven_id",
  48. VarietyTagID: "variety_tag_id",
  49. VarietyTagName: "variety_tag_name",
  50. MainVariable: "main_variable",
  51. CoreDrivenType: "core_driven_type",
  52. CoreDrivenContent: "core_driven_content",
  53. CoreContent: "core_content",
  54. LastUpdateAdminID: "last_update_admin_id",
  55. LastUpdateAdminName: "last_update_admin_name",
  56. SendThsMsgTime: "send_ths_msg_time",
  57. SendTemplateMsgTime: "send_template_msg_time",
  58. ThsMsgState: "ths_msg_state",
  59. TemplateMsgState: "template_msg_state",
  60. PublishState: "publish_state",
  61. CreateTime: "create_time",
  62. ModifyTime: "modify_time",
  63. }