model

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameEntrustOrder = "entrust_order"
View Source
const TableNameMatchedOrder = "matched_order"

Variables

This section is empty.

Functions

This section is empty.

Types

type EntrustOrder

type EntrustOrder struct {
	ID             int64  `gorm:"column:id;primaryKey;comment:序号 主键 雪花算法生成,递增" json:"id"`
	OrderID        string `gorm:"column:order_id;not null;comment:订单号" json:"order_id"`
	UserID         int64  `gorm:"column:user_id;not null;comment:用户id" json:"user_id"`
	SymbolID       int32  `gorm:"column:symbol_id;not null;comment:交易对ID" json:"symbol_id"`
	SymbolName     string `gorm:"column:symbol_name;not null;comment:交易对名称" json:"symbol_name"`
	Qty            string `gorm:"column:qty;not null;comment:下单数量" json:"qty"`
	Price          string `gorm:"column:price;not null;comment:价格" json:"price"`
	Side           int32  `gorm:"column:side;not null;comment:方向1买 2卖" json:"side"`
	Amount         string `gorm:"column:amount;not null;comment:金额" json:"amount"`
	Status         int32  `gorm:"column:status;not null;comment:状态1新订单2部分成交 3全部成交,4撤销,5无效订单" json:"status"`
	OrderType      int32  `gorm:"column:order_type;not null;comment:订单类型1市价单2限价单" json:"order_type"`
	FilledQty      string `gorm:"column:filled_qty;not null;comment:成交数量" json:"filled_qty"`
	UnFilledQty    string `gorm:"column:un_filled_qty;not null;comment:未成交数量" json:"un_filled_qty"`
	FilledAvgPrice string `gorm:"column:filled_avg_price;not null;comment:成交均价" json:"filled_avg_price"`
	FilledAmount   string `gorm:"column:filled_amount;not null;comment:成交金额" json:"filled_amount"`
	UnFilledAmount string `gorm:"column:un_filled_amount;not null;comment:未成交金额" json:"un_filled_amount"`
	CreatedAt      int64  `gorm:"column:created_at;not null;comment:创建时间" json:"created_at"`
	UpdatedAt      int64  `gorm:"column:updated_at;not null;comment:修改时间" json:"updated_at"`
	DeletedAt      int64  `gorm:"column:deleted_at;not null;comment:删除时间" json:"deleted_at"`
}

EntrustOrder mapped from table <entrust_order>

func (*EntrustOrder) TableName

func (*EntrustOrder) TableName() string

TableName EntrustOrder's table name

type MatchedOrder

type MatchedOrder struct {
	ID           int64  `gorm:"column:id;primaryKey;autoIncrement:true;comment:雪花算法id" json:"id"`
	MatchID      string `gorm:"column:match_id;not null;comment:撮合id" json:"match_id"`
	SymbolID     int32  `gorm:"column:symbol_id;not null;comment:交易对id" json:"symbol_id"`
	SymbolName   string `gorm:"column:symbol_name;not null;comment:交易对名称" json:"symbol_name"`
	TakerOrderID string `gorm:"column:taker_order_id;not null;comment:taker订单id" json:"taker_order_id"`
	MakerOrderID string `gorm:"column:maker_order_id;not null;comment:maker订单id" json:"maker_order_id"`
	Price        string `gorm:"column:price;not null;comment:价格" json:"price"`
	Qty          string `gorm:"column:qty;not null;comment:数量(基础币)" json:"qty"`
	Amount       string `gorm:"column:amount;not null;comment:金额(计价币)" json:"amount"`
	MatchTime    int64  `gorm:"column:match_time;comment:撮合时间" json:"match_time"`
	CreatedAt    int64  `gorm:"column:created_at;not null;comment:创建时间" json:"created_at"`
	UpdatedAt    int64  `gorm:"column:updated_at;not null;comment:修改时间" json:"updated_at"`
}

MatchedOrder mapped from table <matched_order>

func (*MatchedOrder) TableName

func (*MatchedOrder) TableName() string

TableName MatchedOrder's table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL