24 lines
415 B
Go
24 lines
415 B
Go
package initialize
|
|
|
|
import (
|
|
"git.echol.cn/loser/lckt/global"
|
|
"git.echol.cn/loser/lckt/model/article"
|
|
"git.echol.cn/loser/lckt/model/bot"
|
|
"git.echol.cn/loser/lckt/model/category"
|
|
"git.echol.cn/loser/lckt/model/user"
|
|
)
|
|
|
|
func bizModel() error {
|
|
db := global.GVA_DB
|
|
err := db.AutoMigrate(
|
|
category.Category{},
|
|
bot.Bot{},
|
|
article.Article{},
|
|
user.User{},
|
|
)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
return nil
|
|
}
|