feat:完善项目

This commit is contained in:
henry
2021-11-19 19:11:33 +08:00
parent 83a2d64ee6
commit 7bc2feaff9
8 changed files with 11 additions and 13 deletions

View File

@ -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)