feat: 添加了评论功能并注册

This commit is contained in:
Leon
2025-12-16 18:51:50 +08:00
parent ef47d5e2de
commit b9fe48a328
6 changed files with 236 additions and 2 deletions

View File

@@ -23,7 +23,7 @@ func NewDB(dbcfg config.DatabaseConfig) (*gorm.DB, error) {
}
func AutoMigrate(db *gorm.DB) error {
return db.AutoMigrate(&account.Account{}, &video.Video{}, &video.Like{})
return db.AutoMigrate(&account.Account{}, &video.Video{}, &video.Like{}, &video.Comment{})
}
func CloseDB(db *gorm.DB) error {