mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 06:08:16 +00:00
fixed pg types
This commit is contained in:
@@ -9,18 +9,18 @@ type Subscription struct {
|
||||
tableName struct{} `pg:"subscriptions,alias:subscriptions"`
|
||||
BaseModel
|
||||
Description string `json:"description" pg:"description"`
|
||||
StartDate time.Time `json:"startDate" pg:"start_date", type:timestamp`
|
||||
EndDate time.Time `json:"endDate" pg:"end_date", type:timestamp`
|
||||
StartDate time.Time `json:"startDate" pg:"start_date", type:timestamptz`
|
||||
EndDate time.Time `json:"endDate" pg:"end_date", type:timestamptz`
|
||||
HasEnd bool `json:"hasEnd" pg:"hasEnd"`
|
||||
SubscriptionTypeID string `json:"subscriptionTypeId" pg:"subscription_type_id"`
|
||||
SubscriptionType *SubscriptionType `json:"subscriptionType", pg:"rel:has-one, fk:subscription_type_id"`
|
||||
CustomRange int `json:"customRange", pg:"custom_range"`
|
||||
CustomRange int `json:"customRange", pg:"custom_range,default:1"`
|
||||
WalletID string `json:"walletId", pg:"wallet_id"`
|
||||
Wallet *Wallet `json:"wallet" pg:"rel:has-one, fk:wallet_id"`
|
||||
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", type:timestamp`
|
||||
Amount float32 `json:"amount", pg:"amount"`
|
||||
LastTransactionDate time.Time `json:"lastTransactionDate", pg:"last_transaction_date", type:timestamptz`
|
||||
Amount float32 `json:"amount", pg:"amount,default:0"`
|
||||
}
|
||||
|
||||
type NewSubscriptionBody struct {
|
||||
|
||||
Reference in New Issue
Block a user