33 lines
968 B
Go
33 lines
968 B
Go
|
package domain
|
||
|
|
||
|
type OrderStatus int64
|
||
|
|
||
|
func (o *OrderStatus) ToInt64() int64 {
|
||
|
return int64(*o)
|
||
|
}
|
||
|
|
||
|
const (
|
||
|
OrderStatusCreated OrderStatus = 0 // 建立訂單
|
||
|
OrderStatusFailed OrderStatus = 1 // 建單失敗
|
||
|
OrderStatusReviewing OrderStatus = 2 // 審核中
|
||
|
OrderStatusPaying OrderStatus = 3 // 付款中
|
||
|
OrderStatusPaid OrderStatus = 4 // 已付款
|
||
|
OrderStatusPendingTransfer OrderStatus = 5 // 已付款待轉帳
|
||
|
OrderStatusDisputing OrderStatus = 6 // 申訴中
|
||
|
OrderStatusCompleted OrderStatus = 7 // 交易完成
|
||
|
OrderStatusFailedTrade OrderStatus = 8 // 交易失敗
|
||
|
OrderStatusCancelled OrderStatus = 9 // 交易取消
|
||
|
OrderStatusAbnormal OrderStatus = 10 // 交易異常
|
||
|
OrderStatusTimeout OrderStatus = 11 // 交易超時
|
||
|
)
|
||
|
|
||
|
type OrderType int64
|
||
|
|
||
|
const (
|
||
|
OrderTypeTest OrderType = 0 // 測試訂單
|
||
|
)
|
||
|
|
||
|
func (o *OrderType) ToInt() int {
|
||
|
return int(*o)
|
||
|
}
|