Add addtional test data using seeders for Artist Management module

This commit is contained in:
2026-05-09 20:06:52 +02:00
parent 3b255a36de
commit 89d137e714
3 changed files with 712 additions and 176 deletions

View File

@@ -43,6 +43,9 @@ class DevSeeder extends Seeder
/** @var array<string, \App\Models\PersonTag> */
private array $personTags = [];
/** @var array{genres: \Illuminate\Support\Collection<string, \App\Models\Genre>, artists: \Illuminate\Support\Collection<int, \App\Models\Artist>}|null */
private ?array $artistPool = null;
public function run(): void
{
$this->call(RoleSeeder::class);
@@ -163,7 +166,14 @@ class DevSeeder extends Seeder
$templatesCreated = FormBuilderDevSeeder::seedSystemTemplates($this->org);
$this->command->info(" Organisation, 8 users, 6 companies, 7 crowd types, 10 person tags, {$templatesCreated} form_templates created");
// ── Org-wide artist pool (8 genres + 125 artists) ──
// Used as the shared roster: every event draws scheduled +
// unscheduled engagements from this pool.
$this->artistPool = ArtistTimetableDevSeeder::seedOrganisationPool($this->org, 125);
$artistCount = $this->artistPool['artists']->count();
$genreCount = $this->artistPool['genres']->count();
$this->command->info(" Organisation, 8 users, 6 companies, 7 crowd types, 10 person tags, {$templatesCreated} form_templates, {$genreCount} genres, {$artistCount} artists created");
});
}
@@ -956,14 +966,16 @@ class DevSeeder extends Seeder
FormBuilderDevSeeder::seedEventRegistrationShowcase($this->org, $festival, $this->command);
}
// RFC-TIMETABLE v0.2 — artist + timetable fixture for the
// festival (4 stages, 6 artists, 12 engagements, 13 perfs).
ArtistTimetableDevSeeder::seedForFestival(
// RFC-TIMETABLE v0.2 — festival timetable: 5 stages, ~30 scheduled
// performances over 3 days + ~12 unscheduled engagements (linked
// but not yet slotted on a stage/timeslot). Draws from the org pool.
$tt = ArtistTimetableDevSeeder::seedForFestival(
$this->org,
$festival,
[$vrijdag, $zaterdag, $zondag],
$this->artistPool,
);
$this->command->info(' Artist timetable: 4 stages, 12 stage_days, 6 artists, 12 engagements, 13 performances');
$this->command->info(" Artist timetable: {$tt['stages']} stages, {$tt['engagements']} engagements ({$tt['unscheduled']} unscheduled), {$tt['performances']} performances");
$this->command->info(' Echt Feesten 2026 complete');
});
@@ -1031,6 +1043,20 @@ class DevSeeder extends Seeder
$submissions = FormBuilderDevSeeder::seedSubmissionsForEvent($braderie, $formSchema);
$this->command->info(" Form schema + 16 fields + {$submissions} submissions created");
// Stages + timetable (flat event, 1 day, lighter program)
$tt = ArtistTimetableDevSeeder::seedForFlatEvent($this->org, $braderie, $this->artistPool, [
'stages' => [
['name' => 'Marktplein Podium', 'color' => '#e85d75', 'capacity' => 800, 'sort_order' => 1],
['name' => 'Akoestiekhoek', 'color' => '#22c55e', 'capacity' => 200, 'sort_order' => 2],
],
'scheduled' => 8,
'unscheduled' => 4,
'pool_offset' => 50,
'start_hour' => 11,
'end_hour' => 18,
]);
$this->command->info(" Artist timetable: {$tt['stages']} stages, {$tt['engagements']} engagements ({$tt['unscheduled']} unscheduled), {$tt['performances']} performances");
$this->command->info(' Braderie Dorpstown 2026 complete');
});
}
@@ -1206,6 +1232,18 @@ class DevSeeder extends Seeder
$formSchema = FormBuilderDevSeeder::seedEventSchema($ijsbaan);
$submissions = FormBuilderDevSeeder::seedSubmissionsForEvent($ijsbaan, $formSchema);
$this->command->info(" Form schema + 16 fields + {$submissions} submissions created");
// Stages + timetable (series, 4 weekend editions)
$tt = ArtistTimetableDevSeeder::seedForSeries($this->org, $ijsbaan, $weeks, $this->artistPool, [
'stages' => [
['name' => 'Schaatspaviljoen', 'color' => '#0ea5e9', 'capacity' => 800, 'sort_order' => 1],
['name' => 'Verwarmde Tent', 'color' => '#22c55e', 'capacity' => 300, 'sort_order' => 2],
],
'per_week_scheduled' => 3,
'per_week_unscheduled' => 2,
'pool_offset' => 65,
]);
$this->command->info(" Artist timetable: {$tt['stages']} stages, {$tt['engagements']} engagements ({$tt['unscheduled']} unscheduled), {$tt['performances']} performances");
});
}
@@ -1378,6 +1416,24 @@ class DevSeeder extends Seeder
$formSchema = FormBuilderDevSeeder::seedEventSchema($koningsdag);
$submissions = FormBuilderDevSeeder::seedSubmissionsForEvent($koningsdag, $formSchema);
$this->command->info(" Form schema + 16 fields + {$submissions} submissions created");
// Stages + timetable (closed event — most acts contracted+done,
// but a small backlog of unscheduled engagements lives in the
// pool to demo "linked, not slotted" alongside historical data.)
$tt = ArtistTimetableDevSeeder::seedForFlatEvent($this->org, $koningsdag, $this->artistPool, [
'stages' => [
['name' => 'Erasmusbrug Podium', 'color' => '#e85d75', 'capacity' => 2000, 'sort_order' => 1],
['name' => 'Willemsplein Stage', 'color' => '#0ea5e9', 'capacity' => 1500, 'sort_order' => 2],
['name' => 'Oude Haven Floater', 'color' => '#7c3aed', 'capacity' => 600, 'sort_order' => 3],
],
'scheduled' => 12,
'unscheduled' => 4,
'pool_offset' => 90,
'start_hour' => 12,
'end_hour' => 23,
'force_status' => \App\Enums\Artist\ArtistEngagementStatus::Contracted,
]);
$this->command->info(" Artist timetable: {$tt['stages']} stages, {$tt['engagements']} engagements ({$tt['unscheduled']} unscheduled), {$tt['performances']} performances");
});
}
@@ -1410,6 +1466,21 @@ class DevSeeder extends Seeder
FormBuilderDevSeeder::seedEventSchema($event);
// Stages + minimal timetable (draft event — 4 acts in option/draft
// status with a couple already slotted, plus a few unscheduled).
$tt = ArtistTimetableDevSeeder::seedForFlatEvent($this->org, $event, $this->artistPool, [
'stages' => [
['name' => 'Deliplein', 'color' => '#7c3aed', 'capacity' => 500, 'sort_order' => 1],
['name' => 'Kaapse Bar', 'color' => '#22c55e', 'capacity' => 200, 'sort_order' => 2],
],
'scheduled' => 4,
'unscheduled' => 5,
'pool_offset' => 110,
'start_hour' => 21,
'end_hour' => 26,
]);
$this->command->info(" Draft event: {$tt['stages']} stages, {$tt['engagements']} engagements ({$tt['unscheduled']} unscheduled), {$tt['performances']} performances");
$this->command->info(' Empty draft event created (with form schema, 0 submissions)');
});
}