You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
2.4 KiB
37 lines
2.4 KiB
2 months ago
|
package models
|
||
|
|
||
|
import (
|
||
|
"time"
|
||
|
)
|
||
|
|
||
|
type BotStockFurTrade 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)"`
|
||
|
FaceValue int `xorm:"comment('面值') INT"`
|
||
|
KeepDecimal int `xorm:"comment('股票保留小数位') INT"`
|
||
|
LimitPrice string `xorm:"comment('限价') DECIMAL(36,18)"`
|
||
|
MarketMoney string `xorm:"not null 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)"`
|
||
|
PryNum int `xorm:"comment('杠杆') INT"`
|
||
|
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_s) index(user_id) TINYINT(1)"`
|
||
|
StockId string `xorm:"not null comment('股票id') index(u_s_s) index(user_id) VARCHAR(100)"`
|
||
|
StockName string `xorm:"comment('股票名称') VARCHAR(255)"`
|
||
|
StopLossPrice string `xorm:"comment('止损价') DECIMAL(36,18)"`
|
||
|
StopType int `xorm:"not null comment('止损止盈设置:0无设置,1止损止盈') TINYINT(1)"`
|
||
|
StopWinPrice string `xorm:"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_s) index(user_id) INT"`
|
||
|
}
|