$this->id, 'shift_id' => $this->shift_id, 'person_id' => $this->person_id, 'time_slot_id' => $this->time_slot_id, 'status' => $this->status->value, 'auto_approved' => $this->auto_approved, 'assigned_by' => $this->assigned_by, 'assigned_at' => $this->assigned_at?->toIso8601String(), 'approved_by' => $this->approved_by, 'approved_at' => $this->approved_at?->toIso8601String(), 'rejection_reason' => $this->rejection_reason, 'cancelled_by' => $this->cancelled_by, 'cancellation_source' => $this->cancellation_source?->value, 'cancelled_at' => $this->cancelled_at?->toIso8601String(), 'hours_expected' => $this->hours_expected, 'hours_completed' => $this->hours_completed, 'checked_in_at' => $this->checked_in_at?->toIso8601String(), 'checked_out_at' => $this->checked_out_at?->toIso8601String(), 'is_cancellable' => $this->isCancellable(), 'is_approvable' => $this->isApprovable(), 'created_at' => $this->created_at?->toIso8601String(), 'person' => new PersonResource($this->whenLoaded('person')), 'shift' => new ShiftResource($this->whenLoaded('shift')), ]; } }