mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 14:18:12 +00:00
sub to trans
This commit is contained in:
@@ -20,7 +20,7 @@ type Subscription struct {
|
||||
TransactionTypeID string `json:"transactionTypeId", pg:"transaction_type_id"`
|
||||
TransactionType *TransactionType `json:"transactionType", pg:"rel:has-one, fk:transaction_type_id"`
|
||||
LastTransactionDate time.Time `json:"lastTransactionDate", pg:"last_transaction_date"`
|
||||
Amount int `json:"amount", pg:"amount"`
|
||||
Amount float32 `json:"amount", pg:"amount"`
|
||||
}
|
||||
|
||||
type NewSubscriptionBody struct {
|
||||
|
||||
@@ -12,7 +12,7 @@ type Transaction struct {
|
||||
TransactionTypeID string `json:"transactionTypeId", pg:"transaction_type_id"`
|
||||
TransactionType *TransactionType `json:"transactionType", pg:"rel:has-one, fk:transaction_type_id"`
|
||||
WalletID string `json:"walletId", pg:"wallet_id"`
|
||||
Amount int `json:"amount", pg:"amount"`
|
||||
Amount float32 `json:"amount", pg:"amount"`
|
||||
Wallet *Wallet `json:"wallet" pg:"rel:has-one, fk:wallet_id"`
|
||||
TransactionDate time.Time `json:"transactionDate" pg:"transaction_date"`
|
||||
SubscriptionID string `json:"subscriptionId", pg:"subscription_id"`
|
||||
|
||||
@@ -14,14 +14,17 @@ type NewWalletBody struct {
|
||||
}
|
||||
|
||||
type WalletHeader struct {
|
||||
WalletId string `json:"walletId"`
|
||||
CurrentBalance int `json:"currentBalance"`
|
||||
LastMonth int `json:"lastMonth"`
|
||||
NextMonth int `json:"nextMonth"`
|
||||
Currency string `json:"currency"`
|
||||
WalletId string `json:"walletId"`
|
||||
CurrentBalance float32 `json:"currentBalance"`
|
||||
LastMonth float32 `json:"lastMonth"`
|
||||
NextMonth float32 `json:"nextMonth"`
|
||||
Currency string `json:"currency"`
|
||||
}
|
||||
|
||||
type WalletTransactions struct {
|
||||
WalletId string
|
||||
Transactions []Transaction
|
||||
WalletId string
|
||||
Transactions []Transaction
|
||||
CurrentBalance float32
|
||||
LastMonth float32
|
||||
NextMonth float32
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user