refactor: split modules and harden scraping workflows

This commit is contained in:
ShukeBta
2026-06-24 11:59:18 +08:00
parent efca3cbe69
commit 192f35d9fa
470 changed files with 47957 additions and 33839 deletions
+1 -9
View File
@@ -6,20 +6,12 @@ import (
"github.com/ShukeBta/MediaStationGo/internal/model"
"github.com/ShukeBta/MediaStationGo/internal/repository"
"github.com/glebarez/sqlite"
"go.uber.org/zap"
"gorm.io/gorm"
)
func newPlayProfileTestService(t *testing.T) *PlayProfileService {
t.Helper()
db, err := gorm.Open(sqlite.Open(":memory:"), &gorm.Config{})
if err != nil {
t.Fatal(err)
}
if err := db.AutoMigrate(&model.PlayProfile{}); err != nil {
t.Fatal(err)
}
db := newServiceTestDB(t, &model.PlayProfile{})
return NewPlayProfileService(zap.NewNop(), repository.New(db))
}