feat:完善项目
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"ArmedPolice/config"
|
||||
"ArmedPolice/lib"
|
||||
"ArmedPolice/serve/orm"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
type synchronized struct {
|
||||
@ -58,6 +59,7 @@ func initModel() {
|
||||
|
||||
function := func(synchronized ...*synchronized) {
|
||||
for _, v := range synchronized {
|
||||
fmt.Println(db.Migrator().HasTable(v.iModel))
|
||||
if !db.Migrator().HasTable(v.iModel) {
|
||||
_ = db.Migrator().CreateTable(v.iModel)
|
||||
|
||||
|
Reference in New Issue
Block a user