Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ModelInt ¶
type ModelInt struct { ID int `gorm:"primary_key;AUTO_INCREMENT"` CreatedTime time.Time `gorm:"not null;default:CURRENT_TIMESTAMP"` UpdatedTime time.Time `gorm:"not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"` IsActive bool `gorm:"not null"` }
ModelInt int主键
func (ModelInt) BeforeCreate ¶
BeforeCreate 自动主键值
type ModelUUID ¶
type ModelUUID struct { ID uuid.GUID `gorm:"primary_key"` CreatedTime time.Time `gorm:"not null;default:CURRENT_TIMESTAMP"` UpdatedTime time.Time `gorm:"not null;default:CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP"` IsActive bool `gorm:"not null"` }
ModelUUID uuid主键
func (ModelUUID) BeforeCreate ¶
BeforeCreate 自动主键值
Click to show internal directories.
Click to hide internal directories.