🎨 新增公告通知模块
This commit is contained in:
@@ -5,19 +5,14 @@ import (
|
||||
"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/notice"
|
||||
"git.echol.cn/loser/lckt/model/user"
|
||||
"git.echol.cn/loser/lckt/model/vip"
|
||||
)
|
||||
|
||||
func bizModel() error {
|
||||
db := global.GVA_DB
|
||||
err := db.AutoMigrate(
|
||||
category.Category{},
|
||||
bot.Bot{},
|
||||
article.Article{},
|
||||
user.User{},
|
||||
vip.Vip{},
|
||||
)
|
||||
err := db.AutoMigrate(category.Category{}, bot.Bot{}, article.Article{}, user.User{}, vip.Vip{}, notice.Notice{}, notice.Notice{})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@@ -16,7 +16,7 @@ func initBizRouter(routers ...*gin.RouterGroup) {
|
||||
{
|
||||
categoryRouter := router.RouterGroupApp.Category
|
||||
categoryRouter.InitCategoryRouter(privateGroup, publicGroup)
|
||||
} // 占位方法,保证文件可以正确加载,避免go空变量检测报错,请勿删除。
|
||||
}
|
||||
{
|
||||
botRouter := router.RouterGroupApp.Bot
|
||||
botRouter.InitBotRouter(privateGroup, publicGroup)
|
||||
@@ -34,4 +34,8 @@ func initBizRouter(routers ...*gin.RouterGroup) {
|
||||
vipRouter := router.RouterGroupApp.Vip
|
||||
vipRouter.InitVipRouter(privateGroup, publicGroup)
|
||||
}
|
||||
{
|
||||
noticeRouter := router.RouterGroupApp.Notice
|
||||
noticeRouter.InitNoticeRouter(privateGroup, publicGroup) // 占位方法,保证文件可以正确加载,避免go空变量检测报错,请勿删除。
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user