package models import ( "time" ) type BotDigitalTrade struct { ClosingCost string `xorm:"comment('平仓手续费') DECIMAL(36,18)"` ClosingPrice string `xorm:"comment('平仓价格') DECIMAL(36,18)"` ClosingTime time.Time `xorm:"comment('平仓时间') DATETIME"` CreateTime time.Time `xorm:"not null comment('创建时间') DATETIME"` DealPrice string `xorm:"comment('成交价') DECIMAL(36,18)"` DealType int `xorm:"not null default 0 comment('委托方式:1限价,2市价') index(user_id) TINYINT(1)"` DigitalId string `xorm:"not null comment('数字币交易对id') index(u_s_d) index(user_id) VARCHAR(100)"` KeepDecimal int `xorm:"comment('小数点保留位数') INT"` LimitPrice string `xorm:"comment('限价') DECIMAL(36,18)"` MarketPrice string `xorm:"comment('市价') DECIMAL(36,18)"` OpenTime time.Time `xorm:"comment('开仓时间') DATETIME"` OrderId string `xorm:"not null comment('订单ID') index(order_id) index(user_id) VARCHAR(60)"` OrderMoney string `xorm:"not null comment('订单金额') DECIMAL(36,18)"` OrderNumber string `xorm:"not null comment('委托数量') DECIMAL(36,18)"` OvernightCost string `xorm:"comment('过夜手续费') DECIMAL(36,18)"` ServiceCost string `xorm:"not null comment('持仓手续费') DECIMAL(36,18)"` Status int `xorm:"not null default 0 comment('订单状态:0-挂单(委托),1-持仓订单,2-已撤单,3-完成订单') index(order_id) index(u_s_d) index(user_id) TINYINT(1)"` TotalMoney string `xorm:"not null comment('订单总金额(包含手续费用)') DECIMAL(36,18)"` TradeId int `xorm:"not null pk autoincr comment('自增长ID') INT"` TradeType int `xorm:"not null default 0 comment('交易类型:1买入,2卖出') index(user_id) TINYINT(1)"` UpdateTime time.Time `xorm:"comment('更新时间') DATETIME"` UserId int `xorm:"not null comment('用户ID') index(u_s_d) index(user_id) INT"` }