entity.go 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. package yb_my_chart
  2. import "time"
  3. // YbMyChart 研报-我的图表
  4. type YbMyChart struct {
  5. MyChartID int `gorm:"primaryKey;column:my_chart_id;type:int(10) unsigned;not null" json:"myChartId"`
  6. MyChartClassifyID int `gorm:"index:idx_classify_id;column:my_chart_classify_id;type:int(10) unsigned;not null;default:0" json:"myChartClassifyId"` // 图表分类ID
  7. ChartInfoID int `gorm:"column:chart_info_id;type:int(10) unsigned;not null;default:0" json:"chartInfoId"` // 图表ID
  8. ChartName string `gorm:"column:chart_name;type:varchar(255);not null;default:''" json:"chartName"` // 图表名称
  9. UniqueCode string `gorm:"column:unique_code;type:varchar(64);not null;default:''" json:"uniqueCode"` // 图表唯一编码
  10. ChartImage string `gorm:"column:chart_image;type:varchar(255);not null;default:''" json:"chartImage"` // 图表图片
  11. UserID int `gorm:"index:idx_user_id;column:user_id;type:int(10) unsigned;not null;default:0" json:"userId"`
  12. RealName string `gorm:"column:real_name;type:varchar(100);not null;default:''" json:"realName"` // 真实姓名
  13. CompanyID int `gorm:"column:company_id;type:int(10) unsigned;not null;default:0" json:"companyId"`
  14. CompanyName string `gorm:"column:company_name;type:varchar(100);not null;default:''" json:"companyName"` // 客户名称
  15. CompanyStatus string `gorm:"column:company_status;type:varchar(30);not null;default:''" json:"companyStatus"`
  16. SellerID int `gorm:"column:seller_id;type:int(11)" json:"sellerId"` // 用户ID
  17. ReportID int `gorm:"column:report_id;type:int(10) unsigned;not null;default:0" json:"reportId"` // 报告ID(从哪个报告收藏的)
  18. ReportChapterID int `gorm:"column:report_chapter_id;type:int(10) unsigned;not null;default:0" json:"reportChapterId"` // 报告章节ID
  19. Source int `gorm:"column:source;type:tinyint(4) unsigned;not null;default:1" json:"source"` // 1-ETA图库;2-ETA表格
  20. CreateTime time.Time `gorm:"column:create_time;type:datetime" json:"createTime"`
  21. ModifyTime time.Time `gorm:"column:modify_time;type:datetime" json:"modifyTime"`
  22. }
  23. // TableName get sql table name.获取数据库表名
  24. func (m *YbMyChart) TableName() string {
  25. return "yb_my_chart"
  26. }
  27. // YbMyChartColumns get sql column name.获取数据库列名
  28. var YbMyChartColumns = struct {
  29. MyChartID string
  30. MyChartClassifyID string
  31. ChartInfoID string
  32. ChartName string
  33. UniqueCode string
  34. ChartImage string
  35. UserID string
  36. ReportID string
  37. ReportChapterID string
  38. Source string
  39. CreateTime string
  40. ModifyTime string
  41. }{
  42. MyChartID: "my_chart_id",
  43. MyChartClassifyID: "my_chart_classify_id",
  44. ChartInfoID: "chart_info_id",
  45. ChartName: "chart_name",
  46. UniqueCode: "unique_code",
  47. ChartImage: "chart_image",
  48. UserID: "user_id",
  49. ReportID: "report_id",
  50. ReportChapterID: "report_chapter_id",
  51. Source: "source",
  52. CreateTime: "create_time",
  53. ModifyTime: "modify_time",
  54. }