whenCounted('persons'); return [ 'id' => $this->id, 'event_id' => $this->event_id, 'crowd_type_id' => $this->crowd_type_id, 'name' => $this->name, 'type' => $this->type->value, 'recipient_company_id' => $this->recipient_company_id, 'auto_approve' => $this->auto_approve, 'max_persons' => $this->max_persons, 'is_full' => $this->max_persons !== null && isset($this->persons_count) ? $this->persons_count >= $this->max_persons : false, 'created_at' => $this->created_at->toIso8601String(), 'persons_count' => $personsCount, ]; } }