'date', 'death_date' => 'date', ]; /** * Get the documents associated with the deceased. */ public function documents(): HasMany { return $this->hasMany(DeceasedDocument::class); } /** * Get the interventions associated with the deceased. */ public function interventions(): HasMany { return $this->hasMany(Intervention::class); } /** * Get the file attachments for the deceased (polymorphic). */ public function fileAttachments() { return $this->morphMany(FileAttachment::class, 'attachable')->orderBy('sort_order'); } /** * Get the files attached to this deceased. */ public function attachedFiles() { return $this->fileAttachments()->with('file'); } }