service backend
All checks were successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful

This commit is contained in:
Stephan D
2025-11-07 18:35:26 +01:00
parent 20e8f9acc4
commit 62a6631b9a
537 changed files with 48453 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
package model
import "github.com/tech/sendico/pkg/db/storable"
// Pair describes a supported FX currency pair and related metadata.
type Pair struct {
storable.Base `bson:",inline" json:",inline"`
Pair CurrencyPair `bson:"pair" json:"pair"`
BaseMeta CurrencySettings `bson:"baseMeta" json:"baseMeta"`
QuoteMeta CurrencySettings `bson:"quoteMeta" json:"quoteMeta"`
Providers []string `bson:"providers,omitempty" json:"providers,omitempty"`
IsEnabled bool `bson:"isEnabled" json:"isEnabled"`
TenantRef string `bson:"tenantRef,omitempty" json:"tenantRef,omitempty"`
DefaultProvider string `bson:"defaultProvider,omitempty" json:"defaultProvider,omitempty"`
Attributes map[string]any `bson:"attributes,omitempty" json:"attributes,omitempty"`
SupportedSides []QuoteSide `bson:"supportedSides,omitempty" json:"supportedSides,omitempty"`
FallbackProviders []string `bson:"fallbackProviders,omitempty" json:"fallbackProviders,omitempty"`
Tags []string `bson:"tags,omitempty" json:"tags,omitempty"`
Cross *CrossRateConfig `bson:"cross,omitempty" json:"cross,omitempty"`
}
// Collection implements storable.Storable.
func (*Pair) Collection() string {
return PairsCollection
}