price_driven.go 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package yb
  2. // PriceDriven 价格驱动表
  3. //type PriceDriven struct {
  4. // PriceDrivenId int `orm:"column(price_driven_id);pk" description:"价格驱动ID"`
  5. // //ChartPermissionId int `json:"chart_permission_id" description:"品种权限ID"`
  6. // VarietyTagId int `json:"variety_tag_id" description:"标签ID"`
  7. // VarietyTagName string `json:"variety_tag_name" description:"标签名称"`
  8. // MainVariable string `json:"main_variable" description:"关键变量"`
  9. // CoreDrivenType int `json:"core_driven_type" description:"核心驱动类型 0-多 1-空"`
  10. // CoreDrivenContent string `json:"core_driven_content" description:"核心驱动内容"`
  11. // CoreContent string `json:"core_content" description:"核心内容"`
  12. // LastUpdateAdminId int `json:"last_update_admin_id" description:"最后更新人ID"`
  13. // LastUpdateAdminName string `json:"last_update_admin_name" description:"最后更新人名称"`
  14. // ThsMsgState int `json:"ths_msg_state" description:"同花顺推送状态:0-未推送 1-已推送"`
  15. // TemplateMsgState int `json:"template_msg_state" description:"模板消息推送状态:0-未推送 1-已推送"`
  16. // PublishState int `json:"publish_state" description:"发布状态:0-未发布 1-已发布"`
  17. // SendThsMsgTime time.Time `json:"last_ths_msg_time" description:"最后推送同花顺客群消息时间"`
  18. // SendTemplateMsgTime time.Time `json:"last_template_msg_time" description:"最后推送模板消息时间"`
  19. // CreateTime time.Time `json:"create_time" description:"创建时间"`
  20. // ModifyTime time.Time `json:"modify_time" description:"更新时间"`
  21. //}
  22. // TableName 表名变更
  23. //func (priceDrivenInfo *PriceDriven) TableName() string {
  24. // return "yb_price_driven"
  25. //}
  26. // Add 新增
  27. //func (priceDrivenInfo *PriceDriven) Add() (err error) {
  28. // o := orm.NewOrmUsingDB("weekly")
  29. // id, err := o.Insert(priceDrivenInfo)
  30. // if err != nil {
  31. // return
  32. // }
  33. // priceDrivenInfo.PriceDrivenId = int(id)
  34. // return
  35. //}
  36. // Update 更新
  37. //func (priceDrivenInfo *PriceDriven) Update(cols []string) (err error) {
  38. // o := orm.NewOrmUsingDB("weekly")
  39. // _, err = o.Update(priceDrivenInfo, cols...)
  40. // return
  41. //}
  42. // PriceDrivenSaveLog 价格驱动保存记录表
  43. //type PriceDrivenSaveLog struct {
  44. // Id int `orm:"column(id);pk"`
  45. // PriceDrivenId int `json:"price_driven_id" description:"价格驱动ID"`
  46. // //ChartPermissionId int `json:"chart_permission_id" description:"品种权限ID"`
  47. // VarietyTagId int `json:"variety_tag_id" description:"标签ID"`
  48. // MainVariable string `json:"main_variable" description:"关键变量"`
  49. // CoreDrivenType int `json:"core_driven_type" description:"核心驱动类型 0-多 1-空"`
  50. // CoreDrivenContent string `json:"core_driven_content" description:"核心驱动内容"`
  51. // CoreContent string `json:"core_content" description:"核心内容"`
  52. // AdminId int `json:"admin_id" description:"更新人ID"`
  53. // AdminName string `json:"admin_name" description:"更新人名称"`
  54. // CreateTime time.Time `json:"create_time" description:"创建时间"`
  55. //}
  56. // TableName 表名变更
  57. //func (priceDrivenSaveLogInfo *PriceDrivenSaveLog) TableName() string {
  58. // return "yb_price_driven_save_log"
  59. //}
  60. // Add 新增保存记录
  61. //func (priceDrivenSaveLogInfo *PriceDrivenSaveLog) Add() (err error) {
  62. // o := orm.NewOrmUsingDB("weekly")
  63. // lastId, err := o.Insert(priceDrivenSaveLogInfo)
  64. // if err != nil {
  65. // return
  66. // }
  67. // priceDrivenSaveLogInfo.PriceDrivenId = int(lastId)
  68. // return
  69. //}