feat: enhance doctor address management by including clinic addresses and enforcing required fields

This commit is contained in:
hamed
2026-06-13 18:30:06 +03:30
parent c1c57df4ff
commit d05c070661
5 changed files with 289 additions and 21 deletions
+7 -6
View File
@@ -109,14 +109,15 @@ class DoctorAddress
private function touch(): void { $this->updatedAt = time(); }
public function toArray(): array
public function toArray(?string $clinicName = null): array
{
return [
'id' => (string) $this->id,
'uuid' => $this->uuid,
'type' => $this->type,
'clinic_id' => $this->clinicId,
'name' => $this->name,
'id' => (string) $this->id,
'uuid' => $this->uuid,
'type' => $this->type,
'clinic_id' => $this->clinicId,
'clinic_name' => $clinicName,
'name' => $this->name,
'map' => [
'latitude' => $this->latitude !== null ? (string) $this->latitude : null,
'longitude' => $this->longitude !== null ? (string) $this->longitude : null,