harden business rules

This commit is contained in:
2025-12-27 19:18:54 +01:00
parent 0e7a01d81c
commit 8d2b17d9a8
11 changed files with 343 additions and 55 deletions

View File

@@ -52,6 +52,7 @@ export class RacingLeagueFactory {
};
createdAt: Date;
socialLinks?: { discordUrl?: string; youtubeUrl?: string; websiteUrl?: string };
participantCount?: number;
} = {
id: `league-${i}`,
name: faker.company.name() + ' Racing League',
@@ -59,6 +60,8 @@ export class RacingLeagueFactory {
ownerId: owner.id.toString(),
settings: config,
createdAt,
// Start with some participants for ranked leagues to meet minimum requirements
participantCount: i % 3 === 0 ? 12 : i % 3 === 1 ? 8 : 0,
};
// Add social links with varying completeness