Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseModel ¶
type BaseModel struct { // ID should use uuid_generate_v4() for the pk's ID int `gorm:"primary_key;AUTO_INCREMENT"` CreatedAt time.Time `gorm:"index;not null;default:CURRENT_TIMESTAMP"` // (My|Postgre)SQL UpdatedAt *time.Time `gorm:"index"` }
BaseModel defines the common columns that all db structs should hold, usually db structs based on this have no soft delete
type BaseModelSoftDelete ¶
BaseModelSoftDelete defines the common columns that all db structs should hold, usually. This struct also defines the fields for GORM triggers to detect the entity should soft delete
Click to show internal directories.
Click to hide internal directories.