gorm/model.go

12 lines
291 B
Go
Raw Normal View History

2015-04-13 05:09:00 +03:00
package gorm
import "time"
2016-03-07 09:54:20 +03:00
// Model base model definition, including `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embeded in your models
2015-04-13 05:09:00 +03:00
type Model struct {
ID uint `gorm:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
2015-09-18 05:28:09 +03:00
DeletedAt *time.Time `sql:"index"`
2015-04-13 05:09:00 +03:00
}