feat: add social media links field to Doctor entity and update API documentation
This commit is contained in:
@@ -58,6 +58,9 @@ class Doctor
|
||||
#[ORM\Column(type: 'json', nullable: true)]
|
||||
private ?array $images = null;
|
||||
|
||||
#[ORM\Column(name: 'social_media', type: 'json', nullable: true)]
|
||||
private ?array $socialMedia = null;
|
||||
|
||||
#[ORM\Column(name: 'doctor_rate', type: 'float')]
|
||||
private float $doctorRate = 3.5;
|
||||
|
||||
@@ -139,6 +142,7 @@ class Doctor
|
||||
public function getDegree(): ?string { return $this->degree; }
|
||||
public function getInfo(): ?string { return $this->info; }
|
||||
public function getImages(): ?array { return $this->images; }
|
||||
public function getSocialMedia(): ?array { return $this->socialMedia; }
|
||||
public function getDoctorRate(): float { return $this->doctorRate; }
|
||||
public function getDoctorRatePercentage(): float { return $this->doctorRatePercentage; }
|
||||
public function isActiveDoctorAppointment(): bool { return $this->activeDoctorAppointment; }
|
||||
@@ -160,6 +164,7 @@ class Doctor
|
||||
public function setDegree(?string $v): self { $this->degree = $v; $this->touch(); return $this; }
|
||||
public function setInfo(?string $v): self { $this->info = $v; $this->touch(); return $this; }
|
||||
public function setImages(?array $v): self { $this->images = $v; $this->touch(); return $this; }
|
||||
public function setSocialMedia(?array $v): self { $this->socialMedia = $v; $this->touch(); return $this; }
|
||||
public function setDoctorRate(float $v): self { $this->doctorRate = $v; $this->touch(); return $this; }
|
||||
public function setDoctorRatePercentage(float $v): self { $this->doctorRatePercentage = $v; $this->touch(); return $this; }
|
||||
public function setActiveDoctorAppointment(bool $v): self { $this->activeDoctorAppointment = $v; $this->touch(); return $this; }
|
||||
@@ -288,6 +293,7 @@ class Doctor
|
||||
], $this->specialties->toArray()),
|
||||
'active' => $this->activeDoctorAppointment && $sf['has_schedule'],
|
||||
'img' => $this->images ?? [],
|
||||
'social_media' => $this->socialMedia,
|
||||
'expertise' => array_map(fn(DoctorService $ds) => [
|
||||
'uuid' => $ds->getUuid(), 'id' => (string) $ds->getId(), 'name' => $ds->getName(),
|
||||
], $this->services->toArray()),
|
||||
|
||||
Reference in New Issue
Block a user