*/ final class CrowdListFactory extends Factory { private const INTERNAL_NAMES = [ 'VIP Gastenlijst', 'Backstage Crew', 'Barpersoneel', 'Opbouw Team', 'Afbouw Team', 'Vrijwilligers Hoofdpodium', 'Nachtploeg', 'EHBO Team', 'Parkeerteam', 'Kassa Medewerkers', ]; private const EXTERNAL_NAMES = [ 'Catering Medewerkers', 'Beveiligingspersoneel', 'Technische Crew', 'Schoonmaakploeg', 'Leveranciers Personeel', ]; /** @return array */ public function definition(): array { return [ 'event_id' => Event::factory(), 'crowd_type_id' => CrowdType::factory(), 'name' => fake()->randomElement(self::INTERNAL_NAMES), 'type' => CrowdListType::INTERNAL, 'recipient_company_id' => null, 'auto_approve' => false, 'max_persons' => null, ]; } public function external(): static { return $this->state(fn () => [ 'name' => fake()->randomElement(self::EXTERNAL_NAMES), 'type' => CrowdListType::EXTERNAL, 'recipient_company_id' => Company::factory(), ]); } public function withAutoApprove(): static { return $this->state(fn () => [ 'auto_approve' => true, ]); } public function withMaxPersons(int $max): static { return $this->state(fn () => [ 'max_persons' => $max, ]); } }