mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +00:00
types: update deposit fields and withdraw fields
This commit is contained in:
parent
2b485602ad
commit
ac45bb306a
|
@ -1,6 +1,10 @@
|
|||
package types
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/datatype"
|
||||
)
|
||||
|
||||
type DepositStatus string
|
||||
|
||||
|
@ -20,15 +24,17 @@ const (
|
|||
)
|
||||
|
||||
type Deposit struct {
|
||||
Time time.Time `json:"time"`
|
||||
Amount float64 `json:"amount"`
|
||||
Asset string `json:"asset"`
|
||||
Address string `json:"address"`
|
||||
GID int64 `json:"gid" db:"gid"`
|
||||
Exchange ExchangeName `json:"exchange" db:"exchange"`
|
||||
Time datatype.Time `json:"time" db:"time"`
|
||||
Amount float64 `json:"amount" db:"amount"`
|
||||
Asset string `json:"asset" db:"asset"`
|
||||
Address string `json:"address" db:"address"`
|
||||
AddressTag string `json:"addressTag"`
|
||||
TransactionID string `json:"txId"`
|
||||
TransactionID string `json:"transactionID" db:"txn_id"`
|
||||
Status DepositStatus `json:"status"`
|
||||
}
|
||||
|
||||
func (d Deposit) EffectiveTime() time.Time {
|
||||
return d.Time
|
||||
return d.Time.Time()
|
||||
}
|
||||
|
|
|
@ -1,22 +1,28 @@
|
|||
package types
|
||||
|
||||
import "time"
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/c9s/bbgo/pkg/datatype"
|
||||
)
|
||||
|
||||
type Withdraw struct {
|
||||
ID string `json:"id"`
|
||||
Asset string `json:"asset"`
|
||||
Amount float64 `json:"amount"`
|
||||
Address string `json:"address"`
|
||||
GID int64 `json:"gid" db:"gid"`
|
||||
Exchange ExchangeName `json:"exchange" db:"exchange"`
|
||||
Asset string `json:"asset" db:"asset"`
|
||||
Amount float64 `json:"amount" db:"amount"`
|
||||
Address string `json:"address" db:"address"`
|
||||
AddressTag string `json:"addressTag"`
|
||||
Status string `json:"status"`
|
||||
|
||||
TransactionID string `json:"txId"`
|
||||
TransactionFee float64 `json:"transactionFee"`
|
||||
TransactionID string `json:"transactionID" db:"txn_id"`
|
||||
TransactionFee float64 `json:"transactionFee" db:"txn_fee"`
|
||||
TransactionFeeCurrency string `json:"transactionFeeCurrency" db:"txn_fee_currency"`
|
||||
WithdrawOrderID string `json:"withdrawOrderId"`
|
||||
ApplyTime time.Time `json:"applyTime"`
|
||||
Network string `json:"network"`
|
||||
ApplyTime datatype.Time `json:"applyTime" db:"time"`
|
||||
Network string `json:"network" db:"network"`
|
||||
}
|
||||
|
||||
func (w Withdraw) EffectiveTime() time.Time {
|
||||
return w.ApplyTime
|
||||
return w.ApplyTime.Time()
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user