mirror of https://github.com/go-gorm/gorm.git
15 lines
350 B
Go
15 lines
350 B
Go
package gorm
|
|
|
|
import "time"
|
|
|
|
// Model base model definition, including fields `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embeded 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"`
|
|
}
|