File bundle

This commit is contained in:
2025-07-27 22:45:17 +08:00
parent 7442b8416f
commit e31a5ea017
19 changed files with 1397 additions and 16 deletions

View File

@@ -47,13 +47,12 @@ public class UsageService(AppDatabase db)
.Where(f => f.PoolId == p.Id)
.Sum(f => f.Size) / 1024.0 / 1024.0 *
(p.BillingConfig.CostMultiplier ?? 1.0),
FileCount = db.Files
FileCount = fileQuery
.Count(f => f.PoolId == p.Id)
})
.ToListAsync();
var totalUsage = poolUsages.Sum(p => p.UsageBytes);
var totalCost = poolUsages.Sum(p => p.Cost);
var totalFileCount = poolUsages.Sum(p => p.FileCount);
return new TotalUsageDetails