Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { ID uuid.UUID `pg:",pk, unique, notnull, type:uuid, default:uuid_generate_v4()" json:"id"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `pg:",soft_delete" json:"deleted_at"` }
Base is the base model for other models.
func (*Base) BeforeInsert ¶
BeforeInsert to update CreatedAt and UpdatedAt columns.
type BaseNoID ¶
type BaseNoID struct { CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` DeletedAt *time.Time `pg:",soft_delete" json:"deleted_at"` }
BaseNoID is the base model for other models.
func (*BaseNoID) BeforeInsert ¶
BeforeInsert to update CreatedAt and UpdatedAt columns.
Click to show internal directories.
Click to hide internal directories.