16 lines
439 B
Go
16 lines
439 B
Go
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.ModelSC
|
|
// }
|
|
|
|
type ModelSnakeCase struct {
|
|
ID uint `gorm:"primary_key" json:"id"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
DeletedAt *time.Time `sql:"index" json:"deleted_at"`
|
|
}
|