24 lines
511 B
Go
24 lines
511 B
Go
|
|
package request
|
||
|
|
|
||
|
|
import "furtuna-be/internal/entity"
|
||
|
|
|
||
|
|
type BalanceReq struct {
|
||
|
|
Amount int64 `json:"amount"`
|
||
|
|
Token string `json:"token"`
|
||
|
|
}
|
||
|
|
|
||
|
|
func (b *BalanceReq) ToEntity(partnerID int64) *entity.BalanceWithdrawInquiry {
|
||
|
|
return &entity.BalanceWithdrawInquiry{
|
||
|
|
PartnerID: partnerID,
|
||
|
|
Amount: b.Amount,
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
func (b *BalanceReq) ToEntityReq(partnerID int64) *entity.WalletWithdrawRequest {
|
||
|
|
return &entity.WalletWithdrawRequest{
|
||
|
|
PartnerID: partnerID,
|
||
|
|
Amount: b.Amount,
|
||
|
|
Token: b.Token,
|
||
|
|
}
|
||
|
|
}
|