model.go 402 B

123456789101112131415
  1. package gorm
  2. import "time"
  3. // Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt
  4. // It may be embedded into your model or you may build your own model without it
  5. // type User struct {
  6. // gorm.Model
  7. // }
  8. type Model struct {
  9. ID uint `gorm:"primarykey"`
  10. CreatedAt time.Time
  11. UpdatedAt time.Time
  12. DeletedAt DeletedAt `gorm:"index"`
  13. }