2020-11-28 21:29:31 +01:00
|
|
|
package models
|
|
|
|
|
|
|
|
import (
|
|
|
|
"time"
|
|
|
|
|
|
|
|
"gorm.io/gorm"
|
|
|
|
)
|
|
|
|
|
|
|
|
type Model struct {
|
2020-11-28 21:49:33 +01:00
|
|
|
ID int `gorm:"primarykey"`
|
|
|
|
ModelTimestamps
|
|
|
|
}
|
|
|
|
|
|
|
|
type ModelTimestamps struct {
|
2020-11-28 21:29:31 +01:00
|
|
|
CreatedAt time.Time
|
|
|
|
UpdatedAt time.Time
|
|
|
|
DeletedAt gorm.DeletedAt `gorm:"index"`
|
|
|
|
}
|