github.com/systematiccaos/gorm@v1.22.6/model.go (about)

     1  package gorm
     2  
     3  import "time"
     4  
     5  // Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt
     6  // It may be embedded into your model or you may build your own model without it
     7  //    type User struct {
     8  //      gorm.Model
     9  //    }
    10  type Model struct {
    11  	ID        uint `gorm:"primarykey"`
    12  	CreatedAt time.Time
    13  	UpdatedAt time.Time
    14  	DeletedAt DeletedAt `gorm:"index"`
    15  }