fixed fee direction
This commit is contained in:
28
api/gateway/aurora/storage/model/state.go
Normal file
28
api/gateway/aurora/storage/model/state.go
Normal file
@@ -0,0 +1,28 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
"github.com/tech/sendico/pkg/db/storable"
|
||||
)
|
||||
|
||||
// CardPayout is a Mongo/JSON representation of proto CardPayout
|
||||
type CardPayout struct {
|
||||
storable.Base `bson:",inline" json:",inline"`
|
||||
PaymentRef string `bson:"paymentRef" json:"payment_ref"`
|
||||
OperationRef string `bson:"operationRef" json:"operation_ref"`
|
||||
IdempotencyKey string `bson:"idempotencyKey" json:"idempotency_key"`
|
||||
IntentRef string `bson:"intentRef" json:"intentRef"`
|
||||
ProjectID int64 `bson:"projectId" json:"project_id"`
|
||||
CustomerID string `bson:"customerId" json:"customer_id"`
|
||||
AmountMinor int64 `bson:"amountMinor" json:"amount_minor"`
|
||||
Currency string `bson:"currency" json:"currency"`
|
||||
Status PayoutStatus `bson:"status" json:"status"`
|
||||
ProviderCode string `bson:"providerCode,omitempty" json:"provider_code,omitempty"`
|
||||
ProviderMessage string `bson:"providerMessage,omitempty" json:"provider_message,omitempty"`
|
||||
ProviderPaymentID string `bson:"providerPaymentId,omitempty" json:"provider_payment_id,omitempty"`
|
||||
FailureReason string `bson:"failureReason,omitempty" json:"failure_reason,omitempty"`
|
||||
|
||||
CreatedAt time.Time `bson:"createdAt" json:"created_at"`
|
||||
UpdatedAt time.Time `bson:"updatedAt" json:"updated_at"`
|
||||
}
|
||||
13
api/gateway/aurora/storage/model/status.go
Normal file
13
api/gateway/aurora/storage/model/status.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package model
|
||||
|
||||
type PayoutStatus string
|
||||
|
||||
const (
|
||||
PayoutStatusCreated PayoutStatus = "created" // record exists, not started
|
||||
PayoutStatusProcessing PayoutStatus = "processing" // we are working on it
|
||||
PayoutStatusWaiting PayoutStatus = "waiting" // waiting external world
|
||||
|
||||
PayoutStatusSuccess PayoutStatus = "success" // final success
|
||||
PayoutStatusFailed PayoutStatus = "failed" // final failure
|
||||
PayoutStatusCancelled PayoutStatus = "cancelled" // final cancelled
|
||||
)
|
||||
Reference in New Issue
Block a user