修改gorm.Model为自定义的全局global.GVA_MODEL 方便自定义基础参数
This commit is contained in:
13
server/global/model.go
Normal file
13
server/global/model.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package global
|
||||
|
||||
import (
|
||||
"gorm.io/gorm"
|
||||
"time"
|
||||
)
|
||||
|
||||
type GVA_MODEL struct {
|
||||
ID uint `gorm:"primarykey"`
|
||||
CreatedAt time.Time
|
||||
UpdatedAt time.Time
|
||||
DeletedAt gorm.DeletedAt `gorm:"index" json:"-"`
|
||||
}
|
Reference in New Issue
Block a user