feat: 添加了social的关注功能

This commit is contained in:
Leon
2025-12-19 19:03:42 +08:00
parent 7e97fc5026
commit d2f40acf4d
6 changed files with 340 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ package db
import (
"feedsystem_video_go/internal/account"
"feedsystem_video_go/internal/config"
"feedsystem_video_go/internal/social"
"feedsystem_video_go/internal/video"
"fmt"
@@ -23,7 +24,7 @@ func NewDB(dbcfg config.DatabaseConfig) (*gorm.DB, error) {
}
func AutoMigrate(db *gorm.DB) error {
return db.AutoMigrate(&account.Account{}, &video.Video{}, &video.Like{}, &video.Comment{})
return db.AutoMigrate(&account.Account{}, &video.Video{}, &video.Like{}, &video.Comment{}, &social.Social{})
}
func CloseDB(db *gorm.DB) error {