model.go 396 B

12345678910111213141516
  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. //
  6. // type User struct {
  7. // gorm.Model
  8. // }
  9. type Model struct {
  10. ID uint `gorm:"primarykey"`
  11. CreatedAt time.Time
  12. UpdatedAt time.Time
  13. DeletedAt DeletedAt `gorm:"index"`
  14. }