You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
402 B
16 lines
402 B
3 years ago
|
package gorm
|
||
|
|
||
|
import "time"
|
||
|
|
||
|
// Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt
|
||
|
// It may be embedded into your model or you may build your own model without it
|
||
|
// type User struct {
|
||
|
// gorm.Model
|
||
|
// }
|
||
|
type Model struct {
|
||
|
ID uint `gorm:"primarykey"`
|
||
|
CreatedAt time.Time
|
||
|
UpdatedAt time.Time
|
||
|
DeletedAt DeletedAt `gorm:"index"`
|
||
|
}
|