goodsModels.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. // Package models 10.2商品管理
  2. package models
  3. import "time"
  4. // Goods 商品表
  5. type Goods struct {
  6. Goodsid int64 `json:"goodsid" xorm:"'GOODSID'" binding:"required"` // 商品ID(自增ID SEQ_GOODS)
  7. Goodscode string `json:"goodscode" xorm:"'GOODSCODE'" binding:"required"` // 商品代码(内部)
  8. Goodsname string `json:"goodsname" xorm:"'GOODSNAME'" binding:"required"` // 商品名称
  9. Marketid int64 `json:"marketid" xorm:"'MARKETID'" binding:"required"` // 所属市场ID
  10. Goodsgroupid int64 `json:"goodsgroupid" xorm:"'GOODSGROUPID'"` // 所属商品组ID
  11. Goodsstatus int64 `json:"goodsstatus" xorm:"'GOODSSTATUS'"` // 商品状态- 1:待审核 2:未上市 3:上市 4:已注销 5:审核拒绝 6:退市 7:待退市
  12. Currencyid int64 `json:"currencyid" xorm:"'CURRENCYID'"` // 报价货币ID
  13. Goodunitid int64 `json:"goodunitid" xorm:"'GOODUNITID'"` // 报价单位ID
  14. Agreeunit float64 `json:"agreeunit" xorm:"'AGREEUNIT'"` // 合约单位
  15. Decimalplace int64 `json:"decimalplace" xorm:"'DECIMALPLACE'"` // 报价小数位
  16. Listingdate time.Time `json:"listingdate" xorm:"'LISTINGDATE'"` // 交易开始日期
  17. Lasttradedate time.Time `json:"lasttradedate" xorm:"'LASTTRADEDATE'"` // 最后交易日期(状态:待退市)
  18. Delistingdate time.Time `json:"delistingdate" xorm:"'DELISTINGDATE'"` // 商品退市时间(状态:退市) -- 已作废
  19. Deliveryflag int64 `json:"deliveryflag" xorm:"'DELIVERYFLAG'"` // 交割标志 - 0:不可交割 1:可交割
  20. Hasquoter int64 `json:"hasquoter" xorm:"'HASQUOTER'"` // 是否有报价商 - 0:无报价商 1:有报价商
  21. Hqprotecttime int64 `json:"hqprotecttime" xorm:"'HQPROTECTTIME'"` // 行情保护时间(秒)
  22. Quoteshowtype int64 `json:"quoteshowtype" xorm:"'QUOTESHOWTYPE'"` // 行情报价类型: 1:成交价 2:买卖中间价 3:含买价 4:含卖价做市模式固定为3:含买价
  23. Quoteshowtypeinterval int64 `json:"quoteshowtypeinterval" xorm:"'QUOTESHOWTYPEINTERVAL'"` // 行情报价间隔时间(秒)(成交价时为0)
  24. Modifystatus int64 `json:"modifystatus" xorm:"'MODIFYSTATUS'"` // 变更状态 - 1:未变更 2:变更中 3:待审核 4:已审核
  25. Goodstradetype int64 `json:"goodstradetype" xorm:"'GOODSTRADETYPE'"` // 商品交易权限类型 - 1:可建可平 3:不可建可平
  26. Creatorid int64 `json:"creatorid" xorm:"'CREATORID'"` // 创建人
  27. Createtime time.Time `json:"createtime" xorm:"'CREATETIME'"` // 创建时间
  28. Auditaccountid int64 `json:"auditaccountid" xorm:"'AUDITACCOUNTID'"` // 审核操作员账号
  29. Audittime time.Time `json:"audittime" xorm:"'AUDITTIME'"` // 审核时间
  30. Modifytime time.Time `json:"modifytime" xorm:"'MODIFYTIME'"` // 修改时间
  31. Modifierid int64 `json:"modifierid" xorm:"'MODIFIERID'"` // 修改人
  32. Cancelaccountid int64 `json:"cancelaccountid" xorm:"'CANCELACCOUNTID'"` // 注销操作员账号
  33. Remark string `json:"remark" xorm:"'REMARK'"` // 备注
  34. Canceltime time.Time `json:"canceltime" xorm:"'CANCELTIME'"` // 注销时间
  35. Delistingmode int64 `json:"delistingmode" xorm:"'DELISTINGMODE'"` // 退市方式 - 1:退市平仓 2:退市交收 3:不处理(仅期权\币币兑换)
  36. Forceclosemode int64 `json:"forceclosemode" xorm:"'FORCECLOSEMODE'"` // 定期强平方式 - 1:无 2:每日 3:每周 4:每月[收益权]
  37. Forceclosevalue int64 `json:"forceclosevalue" xorm:"'FORCECLOSEVALUE'"` // 定期强平参数 [收益权]
  38. Cutmode int64 `json:"cutmode" xorm:"'CUTMODE'"` // 斩仓方式 - 1:不斩仓 2:自动斩仓 3:半自动斩仓
  39. Quoteminunit int64 `json:"quoteminunit" xorm:"'QUOTEMINUNIT'"` // 行情最小变动单位 [整数,报价小数位一起使用]
  40. Isbuylimited int64 `json:"isbuylimited" xorm:"'ISBUYLIMITED'"` // 是否限制建仓量 - 0:不限制 1:限制
  41. Innerdealmode int64 `json:"innerdealmode" xorm:"'INNERDEALMODE'"` // 内部成交方式[通道交易] - 1:净头寸 2:开平 3:平今
  42. Outerdealmode int64 `json:"outerdealmode" xorm:"'OUTERDEALMODE'"` // 外部成交方式[通道交易]- 1:净头寸 2:开平 3:平今
  43. Closepricemode int64 `json:"closepricemode" xorm:"'CLOSEPRICEMODE'"` // 强平价格方式 - 1:市价 2:最新价 3:涨跌停(未实现)
  44. Closepriceparam float64 `json:"closepriceparam" xorm:"'CLOSEPRICEPARAM'"` // 强平最新价浮动比例 - 方式为2时使用 (<1)买 上浮 (1+x)*最新价卖 下浮 (1-x)*最新价
  45. Qtydecimalplace int64 `json:"qtydecimalplace" xorm:"'QTYDECIMALPLACE'"` // 成交量小数位
  46. Goodscurrencyid int64 `json:"goodscurrencyid" xorm:"'GOODSCURRENCYID'"` // 合约货币ID
  47. Goodsquotetype int64 `json:"goodsquotetype" xorm:"'GOODSQUOTETYPE'"` // 合约报价类型: 1-直接报价 2-间接报价
  48. Quotegear int64 `json:"quotegear" xorm:"'QUOTEGEAR'"` // 行情档位(1-10)
  49. Outgoodscode string `json:"outgoodscode" xorm:"'OUTGOODSCODE'"` // 商品代码(外部)
  50. }
  51. // TableName is GOODS
  52. func (Goods) TableName() string {
  53. return "GOODS"
  54. }