2015-04-13 05:09:00 +03:00
|
|
|
package gorm
|
|
|
|
|
|
|
|
import "time"
|
|
|
|
|
2016-03-08 16:45:20 +03:00
|
|
|
// Model base model definition, including fields `ID`, `CreatedAt`, `UpdatedAt`, `DeletedAt`, which could be embedded in your models
|
2016-03-07 16:09:05 +03:00
|
|
|
// type User struct {
|
|
|
|
// gorm.Model
|
|
|
|
// }
|
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
|
|
|
}
|