warehouse.go 1.5 KB

1234567891011121314151617181920212223242526272829303132333435
  1. package trade_analysis
  2. // WarehouseExtraConfig 建仓图表配置
  3. type WarehouseExtraConfig struct {
  4. MultipleGraphConfigId int `gorm:"primaryKey;autoIncrement;column:multiple_graph_config_id" description:"多图配置ID"`
  5. WarehouseChartType int `gorm:"column:warehouse_chart_type" description:"图表类型: 1-多单图; 2-空单图; 3-净多单图"`
  6. Exchange string `gorm:"column:exchange" description:"交易所标识"`
  7. ClassifyName string `gorm:"column:classify_name" description:"品种名称"`
  8. Contracts []string `gorm:"-" description:"合约代码"` // 通常不直接映射slice到数据库列
  9. Companies []string `gorm:"-" description:"期货公司, 不超过5个"` // 同上
  10. PredictRatio float64 `gorm:"column:predict_ratio" description:"预估参数, 0-1之间"`
  11. }
  12. // WarehouseChartDataResp 图表详情返回信息
  13. type WarehouseChartDataResp struct {
  14. WarehouseExtraConfig
  15. MultiEdbMappings []*WarehouseEdbSaveItem
  16. }
  17. // WarehouseEdbSaveItem 建仓指标保存
  18. type WarehouseEdbSaveItem struct {
  19. EdbInfoId int `description:"指标ID"`
  20. EdbName string `description:"指标名称"`
  21. Unit string `description:"单位"`
  22. Frequency string `description:"频度"`
  23. ClassifyId int `description:"指标库分类ID"`
  24. UniqueFlag string `description:"唯一标识"`
  25. //ExtraConfig string `description:"配置信息-JSON"`
  26. }
  27. type WarehouseEdbSaveRespItem struct {
  28. WarehouseEdbSaveItem
  29. Tips string `description:"提示信息"`
  30. ErrMsg string `description:"错误信息"`
  31. }