feat: festival/series model with sub-events, cross-event sections, tab navigation, SectionsShiftsPanel extraction
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
44
api/database/factories/ShiftAssignmentFactory.php
Normal file
44
api/database/factories/ShiftAssignmentFactory.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Person;
|
||||
use App\Models\Shift;
|
||||
use App\Models\ShiftAssignment;
|
||||
use App\Models\TimeSlot;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/** @extends Factory<ShiftAssignment> */
|
||||
final class ShiftAssignmentFactory extends Factory
|
||||
{
|
||||
/** @return array<string, mixed> */
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'shift_id' => Shift::factory(),
|
||||
'person_id' => Person::factory(),
|
||||
'time_slot_id' => TimeSlot::factory(),
|
||||
'status' => 'pending_approval',
|
||||
'auto_approved' => false,
|
||||
];
|
||||
}
|
||||
|
||||
public function approved(): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'status' => 'approved',
|
||||
'approved_at' => now(),
|
||||
]);
|
||||
}
|
||||
|
||||
public function autoApproved(): static
|
||||
{
|
||||
return $this->state(fn () => [
|
||||
'status' => 'approved',
|
||||
'auto_approved' => true,
|
||||
'approved_at' => now(),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user