app-cloudep-order-server/pkg/domain/order/direct.go

21 lines
336 B
Go
Raw Normal View History

2025-03-31 09:32:38 +00:00
package order
// DirectType 表示訂單方向
type DirectType int64
// ToInt 將訂單類型轉為 int
func (t DirectType) ToInt() int {
return int(t)
}
// ToInt64 將訂單類型轉為 int64
func (t DirectType) ToInt64() int64 {
return int64(t)
}
// 訂單類型常量
const (
Buy DirectType = iota + 1 // 測試訂單
Sell
)