| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- package models
- import "time"
- // 企业风管期货单据相关
- // Hedgeouttradeposition 对冲外部持仓头寸表 - 导历史
- type Hedgeouttradeposition struct {
- Accountid int64 `json:"accountid" xorm:"'ACCOUNTID'" binding:"required"` // 资金账号[外部母账户]
- Hedgegoodsid int64 `json:"hedgegoodsid" xorm:"'HEDGEGOODSID'" binding:"required"` // 对冲合约ID
- Hedgeaccountcode string `json:"hedgeaccountcode" xorm:"'HEDGEACCOUNTCODE'"` // 对冲账号
- Tradedate string `json:"tradedate" xorm:"'TRADEDATE'"` // 交易日(yyyyMMdd)
- Marketid int32 `json:"marketid" xorm:"'MARKETID'"` // 市场ID
- Ydbuyposition int64 `json:"ydbuyposition" xorm:"'YDBUYPOSITION'"` // 期初买头寸
- Curbuyposition int64 `json:"curbuyposition" xorm:"'CURBUYPOSITION'"` // 期末买头寸
- Curydbuyposition int64 `json:"curydbuyposition" xorm:"'CURYDBUYPOSITION'"` // 期末上日买头寸
- Curtdbuyposition int64 `json:"curtdbuyposition" xorm:"'CURTDBUYPOSITION'"` // 期末今日买头寸
- Freydbuyposition int64 `json:"freydbuyposition" xorm:"'FREYDBUYPOSITION'"` // 冻结上日买头寸
- Fretdbuyposition int64 `json:"fretdbuyposition" xorm:"'FRETDBUYPOSITION'"` // 冻结今日买头寸
- Ydsellposition int64 `json:"ydsellposition" xorm:"'YDSELLPOSITION'"` // 期初卖头寸
- Cursellposition int64 `json:"cursellposition" xorm:"'CURSELLPOSITION'"` // 期末卖头寸
- Curydsellposition int64 `json:"curydsellposition" xorm:"'CURYDSELLPOSITION'"` // 期末上日卖头寸
- Curtdsellposition int64 `json:"curtdsellposition" xorm:"'CURTDSELLPOSITION'"` // 期末今日卖头寸
- Freydsellposition int64 `json:"freydsellposition" xorm:"'FREYDSELLPOSITION'"` // 冻结上日卖头寸
- Fretdsellposition int64 `json:"fretdsellposition" xorm:"'FRETDSELLPOSITION'"` // 冻结今日卖头寸
- }
- // TableName is HEDGE_OUTTRADEPOSITION
- func (Hedgeouttradeposition) TableName() string {
- return "HEDGE_OUTTRADEPOSITION"
- }
- // Hedgeinnerorderdetail 对冲内部委托单表 - 导历史
- type Hedgeinnerorderdetail struct {
- Orderid int64 `json:"orderid" xorm:"'ORDERID'" binding:"required"` // 委托单号(107+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
- Tradedate string `json:"tradedate" xorm:"'TRADEDATE'"` // 交易日(yyyyMMdd)
- Channelbuildtype int32 `json:"channelbuildtype" xorm:"'CHANNELBUILDTYPE'"` // 开平标志 - 0:无 1:建仓 2:平仓
- Closetype int32 `json:"closetype" xorm:"'CLOSETYPE'"` // 平仓方式 - 0:无 1:平今 2:平昨
- Hedgeflag int32 `json:"hedgeflag" xorm:"'HEDGEFLAG'"` // 投机套保标志 - 0:无 1:投机 2:套保 3:套利
- Marketid int32 `json:"marketid" xorm:"'MARKETID'"` // 市场ID
- Goodsid int32 `json:"goodsid" xorm:"'GOODSID'"` // 商品ID
- Accountid int64 `json:"accountid" xorm:"'ACCOUNTID'"` // 账户ID
- Buyorsell int32 `json:"buyorsell" xorm:"'BUYORSELL'"` // 买卖 - 0:买 1:卖
- Pricemode int32 `json:"pricemode" xorm:"'PRICEMODE'"` // 取价方式 - 1:市价 2: 限价
- Orderprice float64 `json:"orderprice" xorm:"'ORDERPRICE'"` // 委托价格(账户)
- Openorderqty int64 `json:"openorderqty" xorm:"'OPENORDERQTY'"` // 委托数量
- Opentradeqty int64 `json:"opentradeqty" xorm:"'OPENTRADEQTY'"` // 成交数量
- Opencancelqty int64 `json:"opencancelqty" xorm:"'OPENCANCELQTY'"` // 撤单数量
- Openfailqty int64 `json:"openfailqty" xorm:"'OPENFAILQTY'"` // 失败数量
- Opensuccessqty int64 `json:"opensuccessqty" xorm:"'OPENSUCCESSQTY'"` // 建仓委托成功数量
- Closeorderqty int64 `json:"closeorderqty" xorm:"'CLOSEORDERQTY'"` // 委托数量
- Closetradeqty int64 `json:"closetradeqty" xorm:"'CLOSETRADEQTY'"` // 成交数量
- Closecancelqty int64 `json:"closecancelqty" xorm:"'CLOSECANCELQTY'"` // 撤单数量
- Closefailqty int64 `json:"closefailqty" xorm:"'CLOSEFAILQTY'"` // 失败数量
- Closesuccessqty int64 `json:"closesuccessqty" xorm:"'CLOSESUCCESSQTY'"` // 委托成功数量
- Openfreezemargin float64 `json:"openfreezemargin" xorm:"'OPENFREEZEMARGIN'"` // 冻结保证金(冻结交易金额)
- Openunfreezemargin float64 `json:"openunfreezemargin" xorm:"'OPENUNFREEZEMARGIN'"` // 解冻保证金
- Openfreezecharge float64 `json:"openfreezecharge" xorm:"'OPENFREEZECHARGE'"` // 建仓冻结手续费(账户)
- Openunfreezecharge float64 `json:"openunfreezecharge" xorm:"'OPENUNFREEZECHARGE'"` // 建仓解冻手续费(账户)
- Validtype int32 `json:"validtype" xorm:"'VALIDTYPE'"` // 有效类型 - 1当日有效
- Validtime time.Time `json:"validtime" xorm:"'VALIDTIME'"` // 有效期限
- Channeloperatetype int32 `json:"channeloperatetype" xorm:"'CHANNELOPERATETYPE'"` // 操作类型 - 1:正常委托 2:斩仓委托 3:强平委托
- Ordertime time.Time `json:"ordertime" xorm:"'ORDERTIME'"` // 委托时间
- Channelordersrc int32 `json:"channelordersrc" xorm:"'CHANNELORDERSRC'"` // 委托来源 - 1:客户端 2:风控服务 3:管理端 4:下单接口平台 5:交易服务 6:跟单服务 7:监控终端
- Channelinnerorderstatus int32 `json:"channelinnerorderstatus" xorm:"'CHANNELINNERORDERSTATUS'"` // 委托状态 - 1:委托请求 2:冻结成功 3:委托失败 4:委托部成部失败 5:委托成功 6:全部撤销 7:部成部撤 8:部成部撤部失败 9:全部成交
- Operatorid int64 `json:"operatorid" xorm:"'OPERATORID'"` // 登录账号(LoginID)
- Updatetime time.Time `json:"updatetime" xorm:"'UPDATETIME'"` // 更新时间
- Clientordertime time.Time `json:"clientordertime" xorm:"'CLIENTORDERTIME'"` // 客户端委托时间
- Clientticket string `json:"clientticket" xorm:"'CLIENTTICKET'"` // 客户端流水号
- UUID string `json:"uuid" xorm:"'UUID'"` // 发起端唯一id
- Clienttype int32 `json:"clienttype" xorm:"'CLIENTTYPE'"` // 客户端类型 - 0:保留为未填终端类型 1:PC管理端 2:PC交易端 3:手机客户端_安卓 4:网页客户端 5:微信客户端 6:手机客户端_苹果 7:网上开户客户端 8:无效终端编号 9:报价终端(中江) 10;监控终端
- Retcode int32 `json:"retcode" xorm:"'RETCODE'"` // 错误代码
- Marginalgorithm int32 `json:"marginalgorithm" xorm:"'MARGINALGORITHM'"` // 保证金收取方式 1:比率 2:固定
- Marginvalue float64 `json:"marginvalue" xorm:"'MARGINVALUE'"` // 即市保证金设置值
- Openfeealgorithm int32 `json:"openfeealgorithm" xorm:"'OPENFEEALGORITHM'"` // 建仓手续费收取方式 1:比率 2:固定
- Openchargevalue float64 `json:"openchargevalue" xorm:"'OPENCHARGEVALUE'"` // 建仓手续费设置值
- Closefeealgorithm int32 `json:"closefeealgorithm" xorm:"'CLOSEFEEALGORITHM'"` // 平仓手续费收取方式 1:比率 2:固定
- Closechargevalue float64 `json:"closechargevalue" xorm:"'CLOSECHARGEVALUE'"` // 平仓手续费设置值
- Accountcurrencyid int32 `json:"accountcurrencyid" xorm:"'ACCOUNTCURRENCYID'"` // 账户币种ID
- Goodscurrencyid int32 `json:"goodscurrencyid" xorm:"'GOODSCURRENCYID'"` // 商品币种ID
- Margincurrencyid int32 `json:"margincurrencyid" xorm:"'MARGINCURRENCYID'"` // 保证金币种ID 比率时等于账户币种
- Marginrate float64 `json:"marginrate" xorm:"'MARGINRATE'"` // 保证金汇率-比率时等于1
- Curexchangerate float64 `json:"curexchangerate" xorm:"'CUREXCHANGERATE'"` // 当前汇率
- Goodsorderprice float64 `json:"goodsorderprice" xorm:"'GOODSORDERPRICE'"` // 委托价格(商品)
- Openfreezemargin2 float64 `json:"openfreezemargin2" xorm:"'OPENFREEZEMARGIN2'"` // 建仓冻结保证金(保证金/商品)
- Openfreezecharge2 float64 `json:"openfreezecharge2" xorm:"'OPENFREEZECHARGE2'"` // 建仓冻结手续费(商品)
- Openunfreezemargin2 float64 `json:"openunfreezemargin2" xorm:"'OPENUNFREEZEMARGIN2'"` // 建仓解冻保证金(保证金/商品)
- Openunfreezecharge2 float64 `json:"openunfreezecharge2" xorm:"'OPENUNFREEZECHARGE2'"` // 建仓解冻手续费(商品)
- Parentaccountid int64 `json:"parentaccountid" xorm:"'PARENTACCOUNTID'"` // 所属母账户
- Sessionid int64 `json:"sessionid" xorm:"'SESSIONID'"` // 会话ID
- }
- // TableName is HEDGE_INNERORDERDETAIL
- func (Hedgeinnerorderdetail) TableName() string {
- return "HEDGE_INNERORDERDETAIL"
- }
- // Hedgeinnertradedetail 对冲内部成交单表 - 导历史
- type Hedgeinnertradedetail struct {
- Tradeid int64 `json:"tradeid" xorm:"'TRADEID'" binding:"required"` // 成交单号(108+Unix秒时间戳(10位)+2位(MarketServiceID)+xxxx)
- Buyorsell int32 `json:"buyorsell" xorm:"'BUYORSELL'" binding:"required"` // 方向 - 0:买 1:卖
- Orderid int64 `json:"orderid" xorm:"'ORDERID'"` // 委托单号
- Tradedate string `json:"tradedate" xorm:"'TRADEDATE'"` // 交易日(yyyyMMdd)
- Accountid int64 `json:"accountid" xorm:"'ACCOUNTID'"` // 账号ID
- Goodsid int32 `json:"goodsid" xorm:"'GOODSID'"` // 商品ID
- Marketid int32 `json:"marketid" xorm:"'MARKETID'"` // 市场ID
- Tradetime time.Time `json:"tradetime" xorm:"'TRADETIME'"` // 成交时间
- Tradeprice float64 `json:"tradeprice" xorm:"'TRADEPRICE'"` // 成交价格
- Tradeqty int64 `json:"tradeqty" xorm:"'TRADEQTY'"` // 成交数量
- Tradeamount float64 `json:"tradeamount" xorm:"'TRADEAMOUNT'"` // 成交金额(账户)
- Closepl float64 `json:"closepl" xorm:"'CLOSEPL'"` // 平仓盈亏(账户)
- Opencharge float64 `json:"opencharge" xorm:"'OPENCHARGE'"` // 建仓手续费(账户)
- Closecharge float64 `json:"closecharge" xorm:"'CLOSECHARGE'"` // 平仓手续费(账户)
- Tradetype int32 `json:"tradetype" xorm:"'TRADETYPE'"` // 成交类别 - 1:正常委托成交 2:风控斩仓成交 3:修正持仓成交 4:管理端斩仓成交
- Channelbuildtype int32 `json:"channelbuildtype" xorm:"'CHANNELBUILDTYPE'"` // 委托单据类型 0:无 1:建仓 2:平仓
- Closetype int32 `json:"closetype" xorm:"'CLOSETYPE'"` // 平仓方式 - 0:无 1:平今 2:平昨
- Hedgeflag int32 `json:"hedgeflag" xorm:"'HEDGEFLAG'"` // 投机套保标志 - 0:无 1:投机 2:套保 3:套利
- Openqty int64 `json:"openqty" xorm:"'OPENQTY'"` // 开仓数量(先建后平操作 需要记录)
- Closeqty int64 `json:"closeqty" xorm:"'CLOSEQTY'"` // 平仓数量(先建后平操作 需要记录)
- Status int32 `json:"status" xorm:"'STATUS'"` // 处理状态 - 1:待处理 2:已处理 3:处理失败
- Isreckoned int32 `json:"isreckoned" xorm:"'ISRECKONED'"` // 是否结算 - 0:未结算 1:已结算
- Openfeealgorithm int32 `json:"openfeealgorithm" xorm:"'OPENFEEALGORITHM'"` // 建仓手续费收取方式 1:比率 2:固定
- Openchargevalue float64 `json:"openchargevalue" xorm:"'OPENCHARGEVALUE'"` // 建仓手续费设置值
- Closefeealgorithm int32 `json:"closefeealgorithm" xorm:"'CLOSEFEEALGORITHM'"` // 平仓手续费收取方式 1:比率 2:固定
- Closechargevalue float64 `json:"closechargevalue" xorm:"'CLOSECHARGEVALUE'"` // 平仓手续费设置值
- Accountcurrencyid int32 `json:"accountcurrencyid" xorm:"'ACCOUNTCURRENCYID'"` // 账户币种ID
- Goodscurrencyid int32 `json:"goodscurrencyid" xorm:"'GOODSCURRENCYID'"` // 商品币种ID
- Curexchangerate float64 `json:"curexchangerate" xorm:"'CUREXCHANGERATE'"` // 当前汇率
- Opencharge2 float64 `json:"opencharge2" xorm:"'OPENCHARGE2'"` // 建仓手续费(商品)
- Closecharge2 float64 `json:"closecharge2" xorm:"'CLOSECHARGE2'"` // 平仓手续费(商品)
- Closepl2 float64 `json:"closepl2" xorm:"'CLOSEPL2'"` // 平仓盈亏(商品)
- Closepl3 float64 `json:"closepl3" xorm:"'CLOSEPL3'"` // 平仓盈亏(账户)(逐笔)
- Closepl4 float64 `json:"closepl4" xorm:"'CLOSEPL4'"` // 平仓盈亏(商品)(逐笔)
- Extenalopenfeealgorithm int32 `json:"extenalopenfeealgorithm" xorm:"'EXTENALOPENFEEALGORITHM'"` // 建仓手续费收取方式(外部配置) 1:比率 2:固定
- Extenalopenchargevalue float64 `json:"extenalopenchargevalue" xorm:"'EXTENALOPENCHARGEVALUE'"` // 建仓手续费设置值
- Extenalclosefeealgorithm int32 `json:"extenalclosefeealgorithm" xorm:"'EXTENALCLOSEFEEALGORITHM'"` // 平仓手续费收取方式 1:比率 2:固定
- Extenalclosechargevalue float64 `json:"extenalclosechargevalue" xorm:"'EXTENALCLOSECHARGEVALUE'"` // 平仓手续费设置值
- Extenalopencharge float64 `json:"extenalopencharge" xorm:"'EXTENALOPENCHARGE'"` // 建仓手续费(商品)(外部)
- Extenalclosecharge float64 `json:"extenalclosecharge" xorm:"'EXTENALCLOSECHARGE'"` // 平仓手续费(商品)(外部)
- Parentaccountid int64 `json:"parentaccountid" xorm:"'PARENTACCOUNTID'"` // 所属母账户
- Relatedouttradeid int64 `json:"relatedouttradeid" xorm:"'RELATEDOUTTRADEID'"` // 关联外部成交单ID
- }
- // TableName is HEDGE_INNERTRADEDETAIL
- func (Hedgeinnertradedetail) TableName() string {
- return "HEDGE_INNERTRADEDETAIL"
- }
|