Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct { PrimaryKey Name string UserID UUID }
type PrimaryKey ¶
type PrimaryKey struct {
ID UUID `gorm:"column:id"`
}
PrimaryKey represents a primary key for an entity in the form of an UUID. The reason it's needed is because not all UUIDs need to have GORM's BeforeCreate hook method. PrimaryKey encapsulates that behaviour, instead.
func (*PrimaryKey) BeforeCreate ¶
func (p *PrimaryKey) BeforeCreate(tx *gorm.DB) error
Click to show internal directories.
Click to hide internal directories.