Codebase list golang-github-jinzhu-gorm / b5280b00-96bd-4477-9583-d34c83f4c536/upstream model.go
b5280b00-96bd-4477-9583-d34c83f4c536/upstream

Tree @b5280b00-96bd-4477-9583-d34c83f4c536/upstream (Download .tar.gz)

model.go @b5280b00-96bd-4477-9583-d34c83f4c536/upstreamraw · history · blame

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"`
}