fixed pg types

This commit is contained in:
Fran Jurmanović
2021-06-29 21:36:24 +02:00
parent a5f8a8818c
commit 81e55896b1
6 changed files with 13 additions and 13 deletions

View File

@@ -12,9 +12,9 @@ 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 float32 `json:"amount", pg:"amount"`
Amount float32 `json:"amount", pg:"amount,default:0"`
Wallet *Wallet `json:"wallet" pg:"rel:has-one, fk:wallet_id"`
TransactionDate time.Time `json:"transactionDate" pg:"transaction_date, type:timestamp"`
TransactionDate time.Time `json:"transactionDate" pg:"transaction_date, type:timestamptz"`
SubscriptionID string `json:"subscriptionId", pg:"subscription_id"`
Subscription *Subscription `json:"subscription", pg:"rel:has-one, fk:subscription_id"`
}