Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Base ¶
type Base struct { ID string `pg:",pk" json:"id,omitempty"` CreatedAt time.Time `json:"created_at,omitempty"` UpdatedAt time.Time `json:"updated_at,omitempty"` DeletedAt time.Time `pg:",soft_delete"json:"deleted_at,omitempty"` }
Base contains common fields for all tables
func (*Base) BeforeInsert ¶
BeforeInsert hooks into insert operations, setting createdAt and updatedAt to current time
Click to show internal directories.
Click to hide internal directories.