1
3
mirror of https://github.com/jinzhu/gorm.git synced 2020-06-03 17:06:34 +00:00
gorm/model.go
2016-03-08 22:00:15 +08:00

15 lines
351 B
Go

package gorm
import "time"
// Model base model definition, including fields `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embedded in your models
// type User struct {
// gorm.Model
// }
type Model struct {
ID uint `gorm:"primary_key"`
CreatedAt time.Time
UpdatedAt time.Time
DeletedAt *time.Time `sql:"index"`
}