*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'organisation_id' => $this->organisation_id, 'name' => $this->name, 'slug' => $this->slug, 'purpose' => $this->purpose instanceof \BackedEnum ? $this->purpose->value : $this->purpose, 'description' => $this->description, 'schema_snapshot' => $this->schema_snapshot, 'is_system' => (bool) $this->is_system, 'is_active' => (bool) $this->is_active, 'created_at' => optional($this->created_at)->toIso8601String(), 'updated_at' => optional($this->updated_at)->toIso8601String(), ]; } }