mirror of
https://github.com/FJurmanovic/wallet-go-api.git
synced 2026-02-06 14:18:12 +00:00
added wallet controller
This commit is contained in:
16
pkg/models/wallets.go
Normal file
16
pkg/models/wallets.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package models
|
||||
|
||||
type WalletModel struct {
|
||||
tableName struct{} `pg:"wallets,alias:wallets"`
|
||||
CommonModel
|
||||
WalletTypeID string `json:"walletTypeId" pg:"wallet_type_id"`
|
||||
WalletType *WalletTypeModel `json:"walletType" pg:"rel:has-one,fk:wallet_type_id"`
|
||||
UserID string `json:"userId" pg:"user_id"`
|
||||
User *UserReturnInfoModel `json:"user" pg:"rel:has-one,fk:user_id"`
|
||||
}
|
||||
|
||||
type WalletTypeModel struct {
|
||||
tableName struct{} `pg:"walletTypes,alias:walletTypes"`
|
||||
CommonModel
|
||||
Name string `json:"name"`
|
||||
}
|
||||
Reference in New Issue
Block a user