Documentation
¶
Index ¶
- Constants
- Variables
- func AutoMigrate(db GormDB) error
- func GetAllEntities() []interface{}
- type ActionTypeEnum
- type Business
- type FileMetadata
- type GPSCoordinates
- type GormDB
- type GormDBImpl
- func (self *GormDBImpl) AddError(err error) error
- func (self *GormDBImpl) Assign(attrs ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Association(column string) *Association
- func (self *GormDBImpl) Attrs(attrs ...interface{}) (tx GormDB)
- func (self *GormDBImpl) AutoMigrate(dst ...interface{}) error
- func (self *GormDBImpl) Begin(opts ...*sql.TxOptions) GormDB
- func (self *GormDBImpl) Clauses(conds ...clause.Expression) (tx GormDB)
- func (self *GormDBImpl) Commit() GormDB
- func (self *GormDBImpl) Connection(fc func(tx GormDB) error) (err error)
- func (self *GormDBImpl) Count(count *int64) (tx GormDB)
- func (self *GormDBImpl) Create(value interface{}) (tx GormDB)
- func (self *GormDBImpl) CreateInBatches(value interface{}, batchSize int) (tx GormDB)
- func (self *GormDBImpl) DB() (*sql.DB, error)
- func (self *GormDBImpl) Debug() (tx GormDB)
- func (self *GormDBImpl) Delete(value interface{}, conds ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Distinct(args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Exec(sql string, values ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Find(dest interface{}, conds ...interface{}) (tx GormDB)
- func (self *GormDBImpl) FindInBatches(dest interface{}, batchSize int, fc func(tx GormDB, batch int) error) GormDB
- func (self *GormDBImpl) First(dest interface{}, conds ...interface{}) (tx GormDB)
- func (self *GormDBImpl) FirstOrCreate(dest interface{}, conds ...interface{}) (tx GormDB)
- func (self *GormDBImpl) FirstOrInit(dest interface{}, conds ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Get(key string) (interface{}, bool)
- func (self *GormDBImpl) GetConfig() *Config
- func (self *GormDBImpl) GetError() error
- func (self *GormDBImpl) GetRowsAffected() int64
- func (self *GormDBImpl) GetStatement() *Statement
- func (self *GormDBImpl) Group(name string) (tx GormDB)
- func (self *GormDBImpl) Having(query interface{}, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) InnerJoins(query string, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) InstanceGet(key string) (interface{}, bool)
- func (self *GormDBImpl) InstanceSet(key string, value interface{}) GormDB
- func (self *GormDBImpl) Joins(query string, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Last(dest interface{}, conds ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Limit(limit int) (tx GormDB)
- func (self *GormDBImpl) Migrator() Migrator
- func (self *GormDBImpl) Model(value interface{}) (tx GormDB)
- func (self *GormDBImpl) Not(query interface{}, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Offset(offset int) (tx GormDB)
- func (self *GormDBImpl) Omit(columns ...string) (tx GormDB)
- func (self *GormDBImpl) Or(query interface{}, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Order(value interface{}) (tx GormDB)
- func (self *GormDBImpl) Pluck(column string, dest interface{}) (tx GormDB)
- func (self *GormDBImpl) Preload(query string, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Raw(sql string, values ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Rollback() GormDB
- func (self *GormDBImpl) RollbackTo(name string) GormDB
- func (self *GormDBImpl) Row() *sql.Row
- func (self *GormDBImpl) Rows() (*sql.Rows, error)
- func (self *GormDBImpl) Save(value interface{}) (tx GormDB)
- func (self *GormDBImpl) SavePoint(name string) GormDB
- func (self *GormDBImpl) Scan(dest interface{}) (tx GormDB)
- func (self *GormDBImpl) ScanRows(rows *sql.Rows, dest interface{}) error
- func (self *GormDBImpl) Scopes(funcs ...func(GormDB) GormDB) (tx GormDB)
- func (self *GormDBImpl) Select(query interface{}, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Session(config *Session) GormDB
- func (self *GormDBImpl) Set(key string, value interface{}) GormDB
- func (self *GormDBImpl) SetupJoinTable(model interface{}, field string, joinTable interface{}) error
- func (self *GormDBImpl) Table(name string, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) Take(dest interface{}, conds ...interface{}) (tx GormDB)
- func (self *GormDBImpl) ToSQL(queryFn func(tx GormDB) GormDB) string
- func (self *GormDBImpl) Transaction(fc func(tx GormDB) error, opts ...*sql.TxOptions) (err error)
- func (self *GormDBImpl) Unscoped() (tx GormDB)
- func (self *GormDBImpl) Update(column string, value interface{}) (tx GormDB)
- func (self *GormDBImpl) UpdateColumn(column string, value interface{}) (tx GormDB)
- func (self *GormDBImpl) UpdateColumns(values interface{}) (tx GormDB)
- func (self *GormDBImpl) Updates(values interface{}) (tx GormDB)
- func (self *GormDBImpl) Use(plugin Plugin) error
- func (self *GormDBImpl) Where(query interface{}, args ...interface{}) (tx GormDB)
- func (self *GormDBImpl) WithContext(ctx context.Context) GormDB
- type ItemDefinition
- type LocalCard
- type MenuImage
- type OwnedItem
- type OwnedItemStatusEnum
- type Token
- type TokenPurposeEnum
- type Transaction
- type TransactionDetail
- type TransactionStateEnum
- type User
- type VirtualCard
Constants ¶
View Source
const ( NoActionType ActionTypeEnum = "NO_ACTION" RedeemedActionType = "REDEEMED" RecalledActionType = "RECALLED" CancelledActionType = "CANCELLED" )
View Source
const ( TransactionStateStarted TransactionStateEnum = "STARTED" TransactionStateProcesing = "PROCESSING" TransactionStateFinished = "FINISHED" TransactionStateExpired = "EXPIRED" TransactionStateFailed = "FAILED" )
View Source
const ( OwnedItemStatusOwned OwnedItemStatusEnum = "OWNED" OwnedItemStatusUsed = "USED" OwnedItemStatusWithdrawn = "WITHDRAWN" OwnedItemStatusReturned = "RETURNED" )
Variables ¶
View Source
var ErrInvalidCoordinates = errors.New("Invalid coordinates")
Functions ¶
func AutoMigrate ¶
func GetAllEntities ¶
func GetAllEntities() []interface{}
Types ¶
type ActionTypeEnum ¶
type ActionTypeEnum string
type Business ¶
type Business struct {
gorm.Model
PublicId string `gorm:"uniqueIndex;not null"`
OwnerId uint `gorm:"not null"`
Name string `gorm:"not null"`
Description string `gorm:"not null"`
Address string `gorm:"not null"`
GPSCoordinates GPSCoordinates `gorm:"type:geography(POINT,4326);index:,type:gist"`
NIP string `gorm:"unique;not null"`
KRS string `gorm:"unique"`
REGON string `gorm:"unique"`
OwnerName string `gorm:"not null"`
BannerImageId string `gorm:"unique;not null"`
IconImageId string `gorm:"unique;not null"`
ItemDefinitions []ItemDefinition `gorm:"foreignkey:BusinessId"`
MenuImages []MenuImage `gorm:"foreignkey:BusinessId"`
VirtualCards []VirtualCard `gorm:"foreignkey:BusinessId"`
User *User `gorm:"foreignkey:OwnerId"`
}
NOTE index is created in automigrate. couldn't figure out how to create a gin fulltext on many columns from tags alone. INDEX NAME is business_fulltext_idx
type FileMetadata ¶
type GPSCoordinates ¶
func FromCoords ¶
func FromCoords(longitude float64, latitude float64) GPSCoordinates
func GPSCoordinatesFromString ¶
func GPSCoordinatesFromString(coords string) (GPSCoordinates, error)
func (GPSCoordinates) GormDataType ¶
func (g GPSCoordinates) GormDataType() string
func (*GPSCoordinates) Scan ¶
func (g *GPSCoordinates) Scan(input interface{}) error
func (*GPSCoordinates) ToString ¶
func (g *GPSCoordinates) ToString() string
type GormDB ¶
type GormDB interface {
AddError(err error) error
Assign(attrs ...interface{}) (tx GormDB)
Association(column string) *Association
Attrs(attrs ...interface{}) (tx GormDB)
AutoMigrate(dst ...interface{}) error
Begin(opts ...*sql.TxOptions) GormDB
//tldr we cant use callbacks now
//Callback() *callbacks
Clauses(conds ...clause.Expression) (tx GormDB)
Commit() GormDB
Connection(fc func(tx GormDB) error) (err error)
Count(count *int64) (tx GormDB)
Create(value interface{}) (tx GormDB)
CreateInBatches(value interface{}, batchSize int) (tx GormDB)
DB() (*sql.DB, error)
Debug() (tx GormDB)
Delete(value interface{}, conds ...interface{}) (tx GormDB)
Distinct(args ...interface{}) (tx GormDB)
Exec(sql string, values ...interface{}) (tx GormDB)
Find(dest interface{}, conds ...interface{}) (tx GormDB)
FindInBatches(dest interface{}, batchSize int, fc func(tx GormDB, batch int) error) GormDB
First(dest interface{}, conds ...interface{}) (tx GormDB)
FirstOrCreate(dest interface{}, conds ...interface{}) (tx GormDB)
FirstOrInit(dest interface{}, conds ...interface{}) (tx GormDB)
Get(key string) (interface{}, bool)
Group(name string) (tx GormDB)
Having(query interface{}, args ...interface{}) (tx GormDB)
InnerJoins(query string, args ...interface{}) (tx GormDB)
InstanceGet(key string) (interface{}, bool)
InstanceSet(key string, value interface{}) GormDB
Joins(query string, args ...interface{}) (tx GormDB)
Last(dest interface{}, conds ...interface{}) (tx GormDB)
Limit(limit int) (tx GormDB)
Migrator() Migrator
Model(value interface{}) (tx GormDB)
Not(query interface{}, args ...interface{}) (tx GormDB)
Offset(offset int) (tx GormDB)
Omit(columns ...string) (tx GormDB)
Or(query interface{}, args ...interface{}) (tx GormDB)
Order(value interface{}) (tx GormDB)
Pluck(column string, dest interface{}) (tx GormDB)
Preload(query string, args ...interface{}) (tx GormDB)
Raw(sql string, values ...interface{}) (tx GormDB)
Rollback() GormDB
RollbackTo(name string) GormDB
Row() *sql.Row
Rows() (*sql.Rows, error)
Save(value interface{}) (tx GormDB)
SavePoint(name string) GormDB
Scan(dest interface{}) (tx GormDB)
ScanRows(rows *sql.Rows, dest interface{}) error
Scopes(funcs ...func(GormDB) GormDB) (tx GormDB)
Select(query interface{}, args ...interface{}) (tx GormDB)
Session(config *Session) GormDB
Set(key string, value interface{}) GormDB
SetupJoinTable(model interface{}, field string, joinTable interface{}) error
Table(name string, args ...interface{}) (tx GormDB)
Take(dest interface{}, conds ...interface{}) (tx GormDB)
ToSQL(queryFn func(tx GormDB) GormDB) string
Transaction(fc func(tx GormDB) error, opts ...*sql.TxOptions) (err error)
Unscoped() (tx GormDB)
Update(column string, value interface{}) (tx GormDB)
UpdateColumn(column string, value interface{}) (tx GormDB)
UpdateColumns(values interface{}) (tx GormDB)
Updates(values interface{}) (tx GormDB)
Use(plugin Plugin) error
Where(query interface{}, args ...interface{}) (tx GormDB)
WithContext(ctx context.Context) GormDB
GetConfig() *Config
GetError() error
GetRowsAffected() int64
GetStatement() *Statement
}
type GormDBImpl ¶
type GormDBImpl struct {
Db *DB
}
func (*GormDBImpl) AddError ¶
func (self *GormDBImpl) AddError(err error) error
func (*GormDBImpl) Assign ¶
func (self *GormDBImpl) Assign(attrs ...interface{}) (tx GormDB)
func (*GormDBImpl) Association ¶
func (self *GormDBImpl) Association(column string) *Association
func (*GormDBImpl) Attrs ¶
func (self *GormDBImpl) Attrs(attrs ...interface{}) (tx GormDB)
func (*GormDBImpl) AutoMigrate ¶
func (self *GormDBImpl) AutoMigrate(dst ...interface{}) error
func (*GormDBImpl) Clauses ¶
func (self *GormDBImpl) Clauses(conds ...clause.Expression) (tx GormDB)
func (*GormDBImpl) Commit ¶
func (self *GormDBImpl) Commit() GormDB
func (*GormDBImpl) Connection ¶
func (self *GormDBImpl) Connection(fc func(tx GormDB) error) (err error)
func (*GormDBImpl) Count ¶
func (self *GormDBImpl) Count(count *int64) (tx GormDB)
func (*GormDBImpl) Create ¶
func (self *GormDBImpl) Create(value interface{}) (tx GormDB)
func (*GormDBImpl) CreateInBatches ¶
func (self *GormDBImpl) CreateInBatches(value interface{}, batchSize int) (tx GormDB)
func (*GormDBImpl) Debug ¶
func (self *GormDBImpl) Debug() (tx GormDB)
func (*GormDBImpl) Delete ¶
func (self *GormDBImpl) Delete(value interface{}, conds ...interface{}) (tx GormDB)
func (*GormDBImpl) Distinct ¶
func (self *GormDBImpl) Distinct(args ...interface{}) (tx GormDB)
func (*GormDBImpl) Exec ¶
func (self *GormDBImpl) Exec(sql string, values ...interface{}) (tx GormDB)
func (*GormDBImpl) Find ¶
func (self *GormDBImpl) Find(dest interface{}, conds ...interface{}) (tx GormDB)
func (*GormDBImpl) FindInBatches ¶
func (*GormDBImpl) First ¶
func (self *GormDBImpl) First(dest interface{}, conds ...interface{}) (tx GormDB)
func (*GormDBImpl) FirstOrCreate ¶
func (self *GormDBImpl) FirstOrCreate(dest interface{}, conds ...interface{}) (tx GormDB)
func (*GormDBImpl) FirstOrInit ¶
func (self *GormDBImpl) FirstOrInit(dest interface{}, conds ...interface{}) (tx GormDB)
func (*GormDBImpl) Get ¶
func (self *GormDBImpl) Get(key string) (interface{}, bool)
func (*GormDBImpl) GetConfig ¶
func (self *GormDBImpl) GetConfig() *Config
func (*GormDBImpl) GetError ¶
func (self *GormDBImpl) GetError() error
func (*GormDBImpl) GetRowsAffected ¶
func (self *GormDBImpl) GetRowsAffected() int64
func (*GormDBImpl) GetStatement ¶
func (self *GormDBImpl) GetStatement() *Statement
func (*GormDBImpl) Group ¶
func (self *GormDBImpl) Group(name string) (tx GormDB)
func (*GormDBImpl) Having ¶
func (self *GormDBImpl) Having(query interface{}, args ...interface{}) (tx GormDB)
func (*GormDBImpl) InnerJoins ¶
func (self *GormDBImpl) InnerJoins(query string, args ...interface{}) (tx GormDB)
func (*GormDBImpl) InstanceGet ¶
func (self *GormDBImpl) InstanceGet(key string) (interface{}, bool)
func (*GormDBImpl) InstanceSet ¶
func (self *GormDBImpl) InstanceSet(key string, value interface{}) GormDB
func (*GormDBImpl) Joins ¶
func (self *GormDBImpl) Joins(query string, args ...interface{}) (tx GormDB)
func (*GormDBImpl) Last ¶
func (self *GormDBImpl) Last(dest interface{}, conds ...interface{}) (tx GormDB)
func (*GormDBImpl) Limit ¶
func (self *GormDBImpl) Limit(limit int) (tx GormDB)
func (*GormDBImpl) Migrator ¶
func (self *GormDBImpl) Migrator() Migrator
func (*GormDBImpl) Model ¶
func (self *GormDBImpl) Model(value interface{}) (tx GormDB)
func (*GormDBImpl) Not ¶
func (self *GormDBImpl) Not(query interface{}, args ...interface{}) (tx GormDB)
func (*GormDBImpl) Offset ¶
func (self *GormDBImpl) Offset(offset int) (tx GormDB)
func (*GormDBImpl) Omit ¶
func (self *GormDBImpl) Omit(columns ...string) (tx GormDB)
func (*GormDBImpl) Or ¶
func (self *GormDBImpl) Or(query interface{}, args ...interface{}) (tx GormDB)
func (*GormDBImpl) Order ¶
func (self *GormDBImpl) Order(value interface{}) (tx GormDB)
func (*GormDBImpl) Pluck ¶
func (self *GormDBImpl) Pluck(column string, dest interface{}) (tx GormDB)
func (*GormDBImpl) Preload ¶
func (self *GormDBImpl) Preload(query string, args ...interface{}) (tx GormDB)
func (*GormDBImpl) Raw ¶
func (self *GormDBImpl) Raw(sql string, values ...interface{}) (tx GormDB)
func (*GormDBImpl) Rollback ¶
func (self *GormDBImpl) Rollback() GormDB
func (*GormDBImpl) RollbackTo ¶
func (self *GormDBImpl) RollbackTo(name string) GormDB
func (*GormDBImpl) Row ¶
func (self *GormDBImpl) Row() *sql.Row
func (*GormDBImpl) Save ¶
func (self *GormDBImpl) Save(value interface{}) (tx GormDB)
func (*GormDBImpl) SavePoint ¶
func (self *GormDBImpl) SavePoint(name string) GormDB
func (*GormDBImpl) Scan ¶
func (self *GormDBImpl) Scan(dest interface{}) (tx GormDB)
func (*GormDBImpl) ScanRows ¶
func (self *GormDBImpl) ScanRows(rows *sql.Rows, dest interface{}) error
func (*GormDBImpl) Scopes ¶
func (self *GormDBImpl) Scopes(funcs ...func(GormDB) GormDB) (tx GormDB)
func (*GormDBImpl) Select ¶
func (self *GormDBImpl) Select(query interface{}, args ...interface{}) (tx GormDB)
func (*GormDBImpl) Session ¶
func (self *GormDBImpl) Session(config *Session) GormDB
func (*GormDBImpl) Set ¶
func (self *GormDBImpl) Set(key string, value interface{}) GormDB
func (*GormDBImpl) SetupJoinTable ¶
func (self *GormDBImpl) SetupJoinTable(model interface{}, field string, joinTable interface{}) error
func (*GormDBImpl) Table ¶
func (self *GormDBImpl) Table(name string, args ...interface{}) (tx GormDB)
func (*GormDBImpl) Take ¶
func (self *GormDBImpl) Take(dest interface{}, conds ...interface{}) (tx GormDB)
func (*GormDBImpl) Transaction ¶
func (*GormDBImpl) Unscoped ¶
func (self *GormDBImpl) Unscoped() (tx GormDB)
func (*GormDBImpl) Update ¶
func (self *GormDBImpl) Update(column string, value interface{}) (tx GormDB)
func (*GormDBImpl) UpdateColumn ¶
func (self *GormDBImpl) UpdateColumn(column string, value interface{}) (tx GormDB)
func (*GormDBImpl) UpdateColumns ¶
func (self *GormDBImpl) UpdateColumns(values interface{}) (tx GormDB)
func (*GormDBImpl) Updates ¶
func (self *GormDBImpl) Updates(values interface{}) (tx GormDB)
func (*GormDBImpl) Use ¶
func (self *GormDBImpl) Use(plugin Plugin) error
func (*GormDBImpl) Where ¶
func (self *GormDBImpl) Where(query interface{}, args ...interface{}) (tx GormDB)
func (*GormDBImpl) WithContext ¶
func (self *GormDBImpl) WithContext(ctx context.Context) GormDB
type ItemDefinition ¶
type ItemDefinition struct {
gorm.Model
PublicId string `gorm:"uniqueIndex;not null"`
BusinessId uint `gorm:"not null"`
Name string `gorm:"not null"`
Price uint `gorm:"not null"`
Description string `gorm:"not null"`
ImageId string `gorm:"unique"`
StartDate sql.NullTime
EndDate sql.NullTime
MaxAmount uint
Available bool `gorm:"not null"`
Withdrawn bool `gorm:"not null"`
OwnedItems []OwnedItem `gorm:"foreignkey:DefinitionId"`
Business *Business `gorm:"foreignkey:BusinessId"`
}
func (*ItemDefinition) GetBusinessId ¶
func (entity *ItemDefinition) GetBusinessId(_ GormDB) (uint, error)
type LocalCard ¶
type MenuImage ¶
type OwnedItem ¶
type OwnedItem struct {
gorm.Model
PublicId string `gorm:"uniqueIndex;not null"`
DefinitionId uint `gorm:"not null"`
VirtualCardId uint `gorm:"not null"`
Used sql.NullTime
Status OwnedItemStatusEnum `gorm:"default:OWNED;not null"`
ItemDefinition *ItemDefinition `gorm:"foreignkey:DefinitionId"`
VirtualCard *VirtualCard `gorm:"foreignkey:VirtualCardId"`
}
type OwnedItemStatusEnum ¶
type OwnedItemStatusEnum string
type Token ¶
type Token struct {
gorm.Model
OwnerId uint
TokenId string `gorm:"uniqueIndex;not null"`
TokenHash string `gorm:"not null"`
Expires time.Time `gorm:"not null"`
TokenPurpose TokenPurposeEnum `gorm:"not null"`
Used bool `gorm:"default:false;not null"`
Recalled bool `gorm:"default:false;not null"`
User *User `gorm:"foreignkey:OwnerId"`
}
type TokenPurposeEnum ¶
type TokenPurposeEnum string
const ( TokenPurposeSession TokenPurposeEnum = "SESSION" TokenPurposeEmail TokenPurposeEnum = "EMAIL" )
type Transaction ¶
type Transaction struct {
gorm.Model
PublicId string `gorm:"uniqueIndex;not null"`
VirtualCardId uint `gorm:"index:code,unique,priority:1;not null"`
Code string `gorm:"index:code,unique,priority:2;not null"`
State TransactionStateEnum `gorm:"default:STARTED;not null"`
AddedPoints uint
TransactionDetails []TransactionDetail `gorm:"foreignkey:TransactionId"`
VirtualCard *VirtualCard `gorm:"foreignkey:VirtualCardId"`
}
func (*Transaction) GetBusinessId ¶
func (entity *Transaction) GetBusinessId(db GormDB) (uint, error)
type TransactionDetail ¶
type TransactionDetail struct {
gorm.Model
TransactionId uint `gorm:"index:transaction_detail,unique,priority:1;not null"`
ItemId uint `gorm:"index:transaction_detail,unique,priority:2;not null"`
Action ActionTypeEnum `gorm:"default:NO_ACTION;not null"`
Transaction *Transaction `gorm:"foreignkey:TransactionId"`
OwnedItem *OwnedItem `gorm:"foreignkey:ItemId"`
}
type TransactionStateEnum ¶
type TransactionStateEnum string
type User ¶
type User struct {
gorm.Model
PublicId string `gorm:"uniqueIndex;not null"`
//FirstName string `gorm:"not null"`
//LastName string `gorm:"not null"`
Email string `gorm:"uniqueIndex;not null"`
PasswordHash string `gorm:"not null"`
EmailVerified bool `gorm:"default:false;not null"`
Tokens []Token `gorm:"foreignkey:OwnerId"`
FilesMetadata []FileMetadata `gorm:"foreignkey:OwnerId"`
LocalCards []LocalCard `gorm:"foreignkey:OwnerId"`
VirtualCards []VirtualCard `gorm:"foreignkey:OwnerId"`
Business *Business `gorm:"foreignkey:OwnerId"`
}
type VirtualCard ¶
type VirtualCard struct {
gorm.Model
PublicId string `gorm:"uniqueIndex;not null"`
OwnerId uint `gorm:"not null"`
BusinessId uint `gorm:"not null"`
Points uint `gorm:"not null"`
OwnedItems []OwnedItem `gorm:"foreignkey:VirtualCardId"`
Transactions []Transaction `gorm:"foreignkey:VirtualCardId"`
Business *Business `gorm:"foreignkey:BusinessId"`
User *User `gorm:"foreignkey:OwnerId"`
}
func (*VirtualCard) GetBusinessId ¶
func (entity *VirtualCard) GetBusinessId(_ GormDB) (uint, error)
Directories
¶
| Path | Synopsis |
|---|---|
|
gomock_reflect_225727539
command
|
|
|
mocks
Package mock_accessors is a generated GoMock package.
|
Package mock_accessors is a generated GoMock package. |
|
Package mock_database is a generated GoMock package.
|
Package mock_database is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.