Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseDBModel ¶
type BaseDBModel struct { Id int64 `json:"id"` CreateTime int64 `gorm:"type:bigint" json:"creatTime,omitempty"` UpdateTime int64 `gorm:"type:bigint" json:"updateTime,omitempty"` }
func (*BaseDBModel) BeforeCreate ¶
func (base *BaseDBModel) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate 在创建记录之前设置 CreateTime 和 UpdateTime
func (*BaseDBModel) BeforeUpdate ¶
func (base *BaseDBModel) BeforeUpdate(tx *gorm.DB) (err error)
BeforeUpdate 在更新记录之前设置 UpdateTime
Click to show internal directories.
Click to hide internal directories.