feat: implement staff management and subscription system

- Added StaffController for managing clinic staff, including listing, creating, updating, and toggling staff status.
- Created ClinicStaff entity and repository for staff data handling.
- Developed SubscriptionController to manage subscription plans and periods, including trial subscriptions.
- Introduced SubscriptionPlan, SubscriptionPeriod, and ClinicSubscription entities for subscription management.
- Implemented SubscriptionService for handling subscription logic, including trial activation and subscription creation from payments.
- Added necessary repositories for subscription entities to facilitate data access and manipulation.
This commit is contained in:
hamed
2026-06-14 22:10:28 +03:30
parent dcd631f503
commit b0244f28f5
53 changed files with 4434 additions and 40 deletions
+6
View File
@@ -20,6 +20,7 @@ class Payment
public const TYPE_APPOINTMENT = 'appointment';
public const TYPE_SUBSCRIPTION = 'subscription';
public const TYPE_SMS_WALLET = 'sms_wallet';
#[ORM\Id]
#[ORM\GeneratedValue]
@@ -64,6 +65,9 @@ class Payment
#[ORM\Column(name: 'callback_ip', type: 'string', length: 45, nullable: true)]
private ?string $callbackIp = null;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $metadata = null;
#[ORM\Column(name: 'created_at', type: 'integer')]
private int $createdAt;
@@ -96,8 +100,10 @@ class Payment
public function getReferenceId(): ?string { return $this->referenceId; }
public function getFrontendAddress(): ?string { return $this->frontendAddress; }
public function getCallbackIp(): ?string { return $this->callbackIp; }
public function getMetadata(): ?array { return $this->metadata; }
public function setAppointment(?Appointment $a): self { $this->appointment = $a; return $this; }
public function setMetadata(?array $metadata): self { $this->metadata = $metadata; $this->touch(); return $this; }
public function setGatewayToken(?string $t): self { $this->gatewayToken = $t; $this->touch(); return $this; }
public function setReferenceId(?string $r): self { $this->referenceId = $r; $this->touch(); return $this; }
public function setStatus(string $s): self { $this->status = $s; $this->touch(); return $this; }