'array', 'tool_inventory' => 'array', 'certification_records' => 'array', 'profile_visibility' => 'array', 'public_contact' => 'boolean', 'max_technician_level' => 'integer', ]; } public function user(): BelongsTo { return $this->belongsTo(User::class); } public function externalImports(): HasMany { return $this->hasMany(ExternalProfileImport::class); } public function attachments(): MorphMany { return $this->morphMany(Attachment::class, 'attachable'); } public function ratings(): MorphMany { return $this->morphMany(Rating::class, 'rateable'); } public function taxonomyTerms(): BelongsToMany { return $this->belongsToMany(TaxonomyTerm::class) ->withPivot('evidence_source') ->withTimestamps(); } public function tagVerifications(): HasMany { return $this->hasMany(ProviderTagVerification::class); } public function technicianLevel(): array { return config('technician-levels')[(int) $this->max_technician_level] ?? config('technician-levels')[1]; } public function visible(string $field): bool { $visibility = $this->profile_visibility ?? []; return (bool) ($visibility[$field] ?? true); } }