| 12345678910111213 |
- package models
- import "time"
- // BaseModel 基础模型
- type BaseModel struct {
- ID uint `gorm:"column:id;primaryKey;autoIncrement;" json:"id,omitempty"` // 主键ID
- }
- type CommonTimestampsField struct {
- CreatedAt time.Time `gorm:"column:created_at;index;" json:"created_at,omitempty"` // 创建时间
- UpdatedAt time.Time `gorm:"column:updated_at;index;" json:"updated_at,omitempty"` // 更新时间
- }
|