model.go 351 B

1234567891011121314
  1. package gorm
  2. import "time"
  3. // Model base model definition, including fields `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embedded in your models
  4. // type User struct {
  5. // gorm.Model
  6. // }
  7. type Model struct {
  8. ID uint `gorm:"primary_key"`
  9. CreatedAt time.Time
  10. UpdatedAt time.Time
  11. DeletedAt *time.Time `sql:"index"`
  12. }