Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccountCreate ¶
type AccountCreate struct {
ID uuid.UUID
UserID uuid.UUID // User who owns the account
Balance int64 // Initial balance
Status string // Initial status
Currency string
}
AccountCreate is a DTO for creating a new account.
type AccountRead ¶
type AccountRead struct {
ID uuid.UUID // Unique account identifier
UserID uuid.UUID // User who owns the account
Balance float64 // Account balance
Currency string
Status string // Account status (e.g., active, closed)
CreatedAt time.Time // Timestamp of account creation
}
AccountRead is a read-optimized DTO for account queries, API responses, and reporting.
type AccountUpdate ¶
type AccountUpdate struct {
Balance *float64 // Optional balance update
Status *string // Optional status update
}
AccountUpdate is a DTO for updating one or more fields of an account.
type TransactionCreate ¶
type TransactionCreate struct {
ID uuid.UUID
UserID uuid.UUID // User who owns the transaction
AccountID uuid.UUID // Account associated with the transaction
Amount int64 // Transaction amount
Status string // Initial status
Currency string
MoneySource string
ExternalTargetMasked string
TargetCurrency string
}
TransactionCreate is a DTO for creating a new transaction.
type TransactionRead ¶
type TransactionRead struct {
ID uuid.UUID // Unique transaction identifier
UserID uuid.UUID // User who owns the transaction
AccountID uuid.UUID // Account associated with the transaction
Amount float64 // Transaction amount (use string for high precision if needed)
Status string // Transaction status (e.g., completed, pending)
PaymentID string // External payment provider ID
CreatedAt time.Time // Timestamp of transaction creation
}
TransactionRead is a read-optimized DTO for transaction queries, API responses, and reporting.
type TransactionUpdate ¶
type TransactionUpdate struct {
Status *string // Optional status update
PaymentID *string // Optional payment provider ID update
// Conversion fields (nullable when no conversion occurs)
OriginalAmount *float64
OriginalCurrency *string
ConvertedAmount *float64
ConversionRate *float64
TargetCurrency *string
}
TransactionUpdate is a DTO for updating one or more fields of a transaction.
Click to show internal directories.
Click to hide internal directories.