init repo
This commit is contained in:
11
internal/storage/dao/base.go
Normal file
11
internal/storage/dao/base.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package dao
|
||||
|
||||
import (
|
||||
"time"
|
||||
)
|
||||
|
||||
type BaseModel struct {
|
||||
ID int64 `gorm:"bigint;primaryKey;autoIncrement;column:id;comment:主键ID" json:"id"`
|
||||
CreatedAt time.Time `gorm:"column:created_at;comment:创建时间;not null;default:current_timestamp" json:"created_at"`
|
||||
UpdatedAt time.Time `gorm:"column:updated_at;comment:更新时间;not null;default:current_timestamp on update current_timestamp" json:"updated_at"`
|
||||
}
|
||||
Reference in New Issue
Block a user