- 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.
27 lines
729 B
PHP
27 lines
729 B
PHP
<?php
|
|
|
|
namespace App\Sms\Repository;
|
|
|
|
use App\Sms\Entity\SmsSettings;
|
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
|
use Doctrine\Persistence\ManagerRegistry;
|
|
|
|
class SmsSettingsRepository extends ServiceEntityRepository
|
|
{
|
|
public function __construct(ManagerRegistry $registry)
|
|
{
|
|
parent::__construct($registry, SmsSettings::class);
|
|
}
|
|
|
|
public function findByEntity(string $entityType, int $entityId): ?SmsSettings
|
|
{
|
|
return $this->findOneBy(['entityType' => $entityType, 'entityId' => $entityId]);
|
|
}
|
|
|
|
public function save(SmsSettings $settings): void
|
|
{
|
|
$this->getEntityManager()->persist($settings);
|
|
$this->getEntityManager()->flush();
|
|
}
|
|
}
|