Bootstrap copied BFF and local accounts with public Sendico contracts (#34)
This commit is contained in:
1 parent
67dc5b5b1e
commit
7062672a87
556 files changed
+42291
-777
No files matched your search
@@ -0,0 +1,45 @@
|
||||
package model
|
||||
|
||||
import "time"
|
||||
|
||||
type AccountMetadata struct {
|
||||
PersonalLedgerProvisioning *LedgerProvisioningMetadata `bson:"personalLedgerProvisioning,omitempty" json:"-"`
|
||||
}
|
||||
|
||||
type LedgerProvisioningMetadata struct {
|
||||
Source string `bson:"source,omitempty" json:"-"`
|
||||
InvitationRef string `bson:"invitationRef,omitempty" json:"-"`
|
||||
TargetCurrencies []string `bson:"targetCurrencies,omitempty" json:"-"`
|
||||
Created []string `bson:"created,omitempty" json:"-"`
|
||||
AlreadyExisting []string `bson:"alreadyExisting,omitempty" json:"-"`
|
||||
Failed []LedgerProvisioningFailure `bson:"failed,omitempty" json:"-"`
|
||||
Outcome string `bson:"outcome,omitempty" json:"-"`
|
||||
LastErrorClass string `bson:"lastErrorClass,omitempty" json:"-"`
|
||||
LastAttemptAt time.Time `bson:"lastAttemptAt,omitempty" json:"-"`
|
||||
}
|
||||
|
||||
type LedgerProvisioningFailure struct {
|
||||
Currency string `bson:"currency,omitempty" json:"-"`
|
||||
ErrorClass string `bson:"errorClass,omitempty" json:"-"`
|
||||
}
|
||||
|
||||
func (m *AccountMetadata) Copy() *AccountMetadata {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
copied := *m
|
||||
copied.PersonalLedgerProvisioning = m.PersonalLedgerProvisioning.Copy()
|
||||
return &copied
|
||||
}
|
||||
|
||||
func (m *LedgerProvisioningMetadata) Copy() *LedgerProvisioningMetadata {
|
||||
if m == nil {
|
||||
return nil
|
||||
}
|
||||
copied := *m
|
||||
copied.TargetCurrencies = append([]string(nil), m.TargetCurrencies...)
|
||||
copied.Created = append([]string(nil), m.Created...)
|
||||
copied.AlreadyExisting = append([]string(nil), m.AlreadyExisting...)
|
||||
copied.Failed = append([]LedgerProvisioningFailure(nil), m.Failed...)
|
||||
return &copied
|
||||
}
|
||||
Reference in new issue
Block a user