Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterCallbacks ¶
Types ¶
type BaseModel ¶
type BaseModel struct { IDModel MetadataTimeModel DeleteModel }
type BaseUUIDModel ¶
type BaseUUIDModel struct { BaseModel UniqueUUIDModel }
func (BaseUUIDModel) Init ¶
func (m BaseUUIDModel) Init()
type DeleteModel ¶
type DeleteModel struct {
Delete bool `json:"deleted" db:"deleted" gorm:"column:deleted; not null"` // 数据软删除
}
func (DeleteModel) Init ¶
func (m DeleteModel) Init()
type MetadataTimeModel ¶
type MetadataTimeModel struct { Ctime time.Time `json:"ctime" db:"ctime" gorm:"column:ctime; not null"` // 状态最后一次更改 Mtime time.Time `json:"mtime" db:"mtime" gorm:"column:mtime; not null"` // 数据最后一次修改 }
func (MetadataTimeModel) Init ¶
func (m MetadataTimeModel) Init()
type UniqueUUIDModel ¶
type UniqueUUIDModel struct {
UUID uuid.UUID `json:"uuid" db:"uuid" gorm:"column:uuid; uniqueIndex; not null"`
}
func (UniqueUUIDModel) Init ¶
func (m UniqueUUIDModel) Init()
Click to show internal directories.
Click to hide internal directories.