diff --git a/src/Appointment/Entity/Appointment.php b/src/Appointment/Entity/Appointment.php index a83f3dd6..6d0a1429 100644 --- a/src/Appointment/Entity/Appointment.php +++ b/src/Appointment/Entity/Appointment.php @@ -5,9 +5,10 @@ namespace App\Appointment\Entity; use App\Auth\Entity\User; use App\Doctor\Entity\Doctor; use Doctrine\ORM\Mapping as ORM; +use App\Appointment\Repository\AppointmentRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: AppointmentRepository::class)] #[ORM\Table(name: 'appointments')] #[ORM\Index(columns: ['doctor_id', 'slot_start'], name: 'idx_appointments_doctor_slot')] #[ORM\Index(columns: ['user_id', 'status'], name: 'idx_appointments_user_status')] diff --git a/src/Appointment/Entity/DateOverride.php b/src/Appointment/Entity/DateOverride.php index f0742c8b..a7ebb33f 100644 --- a/src/Appointment/Entity/DateOverride.php +++ b/src/Appointment/Entity/DateOverride.php @@ -4,9 +4,10 @@ namespace App\Appointment\Entity; use App\Doctor\Entity\Doctor; use Doctrine\ORM\Mapping as ORM; +use App\Appointment\Repository\DateOverrideRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: DateOverrideRepository::class)] #[ORM\Table(name: 'date_overrides')] #[ORM\Index(columns: ['doctor_id', 'date'], name: 'idx_date_overrides_doctor_date')] class DateOverride diff --git a/src/Appointment/Entity/Holiday.php b/src/Appointment/Entity/Holiday.php index 787b86e7..b21bb4ea 100644 --- a/src/Appointment/Entity/Holiday.php +++ b/src/Appointment/Entity/Holiday.php @@ -4,9 +4,10 @@ namespace App\Appointment\Entity; use App\Doctor\Entity\Doctor; use Doctrine\ORM\Mapping as ORM; +use App\Appointment\Repository\HolidayRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: HolidayRepository::class)] #[ORM\Table(name: 'holidays')] #[ORM\Index(columns: ['doctor_id', 'start_date', 'end_date'], name: 'idx_holidays_doctor_range')] class Holiday diff --git a/src/Appointment/Entity/WeeklySchedule.php b/src/Appointment/Entity/WeeklySchedule.php index c7bcd7fc..1f83bb9b 100644 --- a/src/Appointment/Entity/WeeklySchedule.php +++ b/src/Appointment/Entity/WeeklySchedule.php @@ -4,9 +4,10 @@ namespace App\Appointment\Entity; use App\Doctor\Entity\Doctor; use Doctrine\ORM\Mapping as ORM; +use App\Appointment\Repository\WeeklyScheduleRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: WeeklyScheduleRepository::class)] #[ORM\Table(name: 'weekly_schedules')] #[ORM\UniqueConstraint(name: 'idx_weekly_schedules_doctor', columns: ['doctor_id'])] class WeeklySchedule diff --git a/src/Auth/Entity/User.php b/src/Auth/Entity/User.php index a1387a37..a36c7b75 100644 --- a/src/Auth/Entity/User.php +++ b/src/Auth/Entity/User.php @@ -3,11 +3,12 @@ namespace App\Auth\Entity; use Doctrine\ORM\Mapping as ORM; +use App\Auth\Repository\UserRepository; use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface; use Symfony\Component\Security\Core\User\UserInterface; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: UserRepository::class)] #[ORM\Table(name: 'users')] #[ORM\UniqueConstraint(name: 'uniq_mobile', columns: ['mobile_number'])] class User implements UserInterface, PasswordAuthenticatedUserInterface diff --git a/src/Auth/Entity/UserActiveContext.php b/src/Auth/Entity/UserActiveContext.php index ac92317c..d6317c5b 100644 --- a/src/Auth/Entity/UserActiveContext.php +++ b/src/Auth/Entity/UserActiveContext.php @@ -4,7 +4,8 @@ namespace App\Auth\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +use App\Auth\Repository\UserActiveContextRepository; +#[ORM\Entity(repositoryClass: UserActiveContextRepository::class)] #[ORM\Table(name: 'user_active_context')] class UserActiveContext { diff --git a/src/Blog/Entity/Blog.php b/src/Blog/Entity/Blog.php index b5650ef8..05a95ec3 100644 --- a/src/Blog/Entity/Blog.php +++ b/src/Blog/Entity/Blog.php @@ -4,9 +4,10 @@ namespace App\Blog\Entity; use App\Auth\Entity\User; use Doctrine\ORM\Mapping as ORM; +use App\Blog\Repository\BlogRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: BlogRepository::class)] #[ORM\Table(name: 'blogs')] #[ORM\Index(columns: ['status', 'created_at'], name: 'idx_blogs_status')] class Blog diff --git a/src/Clinic/Entity/Clinic.php b/src/Clinic/Entity/Clinic.php index ffd4a742..3e57b73f 100644 --- a/src/Clinic/Entity/Clinic.php +++ b/src/Clinic/Entity/Clinic.php @@ -10,9 +10,10 @@ use App\Specialty\Entity\Specialty; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; +use App\Clinic\Repository\ClinicRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: ClinicRepository::class)] #[ORM\Table(name: 'clinics')] #[ORM\Index(columns: ['user_id'], name: 'idx_clinics_owner')] #[ORM\Index(columns: ['city_id'], name: 'idx_clinics_city')] diff --git a/src/Config/Entity/SiteConfig.php b/src/Config/Entity/SiteConfig.php index 4c57e3f2..927302ac 100644 --- a/src/Config/Entity/SiteConfig.php +++ b/src/Config/Entity/SiteConfig.php @@ -4,7 +4,8 @@ namespace App\Config\Entity; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +use App\Config\Repository\SiteConfigRepository; +#[ORM\Entity(repositoryClass: SiteConfigRepository::class)] #[ORM\Table(name: 'site_config')] class SiteConfig { diff --git a/src/Config/Entity/TaxRateHistory.php b/src/Config/Entity/TaxRateHistory.php index 45c8228b..0406fc64 100644 --- a/src/Config/Entity/TaxRateHistory.php +++ b/src/Config/Entity/TaxRateHistory.php @@ -5,7 +5,8 @@ namespace App\Config\Entity; use App\Auth\Entity\User; use Doctrine\ORM\Mapping as ORM; -#[ORM\Entity] +use App\Config\Repository\TaxRateHistoryRepository; +#[ORM\Entity(repositoryClass: TaxRateHistoryRepository::class)] #[ORM\Table(name: 'tax_rate_history')] #[ORM\Index(columns: ['changed_at'], name: 'idx_tax_history_date')] class TaxRateHistory diff --git a/src/Doctor/Entity/Doctor.php b/src/Doctor/Entity/Doctor.php index ab6ff34a..3472d029 100644 --- a/src/Doctor/Entity/Doctor.php +++ b/src/Doctor/Entity/Doctor.php @@ -11,9 +11,10 @@ use App\Specialty\Entity\Specialty; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; +use App\Doctor\Repository\DoctorRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: DoctorRepository::class)] #[ORM\Table(name: 'doctors')] #[ORM\UniqueConstraint(name: 'idx_doctors_user', columns: ['user_id'])] #[ORM\Index(columns: ['active_doctor_appointment'], name: 'idx_doctors_active')] diff --git a/src/Doctor/Entity/DoctorAddress.php b/src/Doctor/Entity/DoctorAddress.php index 7dc26513..a553fa8d 100644 --- a/src/Doctor/Entity/DoctorAddress.php +++ b/src/Doctor/Entity/DoctorAddress.php @@ -5,9 +5,10 @@ namespace App\Doctor\Entity; use App\Location\Entity\City; use App\Location\Entity\Province; use Doctrine\ORM\Mapping as ORM; +use App\Doctor\Repository\DoctorAddressRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: DoctorAddressRepository::class)] #[ORM\Table(name: 'doctor_addresses')] #[ORM\Index(columns: ['doctor_id'], name: 'idx_doctor_addresses_doctor')] #[ORM\Index(columns: ['clinic_id'], name: 'idx_doctor_addr_clinic')] diff --git a/src/Payment/Entity/Payment.php b/src/Payment/Entity/Payment.php index 8b1ebf4e..12ef37c9 100644 --- a/src/Payment/Entity/Payment.php +++ b/src/Payment/Entity/Payment.php @@ -5,9 +5,10 @@ namespace App\Payment\Entity; use App\Appointment\Entity\Appointment; use App\Auth\Entity\User; use Doctrine\ORM\Mapping as ORM; +use App\Payment\Repository\PaymentRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: PaymentRepository::class)] #[ORM\Table(name: 'payments')] #[ORM\Index(columns: ['order_id'], name: 'idx_payments_order')] #[ORM\Index(columns: ['user_id'], name: 'idx_payments_user')] diff --git a/src/Rating/Entity/Comment.php b/src/Rating/Entity/Comment.php index dad00ff2..4306e34f 100644 --- a/src/Rating/Entity/Comment.php +++ b/src/Rating/Entity/Comment.php @@ -7,9 +7,10 @@ use App\Doctor\Entity\Doctor; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; +use App\Rating\Repository\CommentRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: CommentRepository::class)] #[ORM\Table(name: 'comments')] #[ORM\Index(columns: ['doctor_id', 'status'], name: 'idx_comments_doctor_status')] class Comment diff --git a/src/Rating/Entity/Like.php b/src/Rating/Entity/Like.php index f379172f..1cc78402 100644 --- a/src/Rating/Entity/Like.php +++ b/src/Rating/Entity/Like.php @@ -4,9 +4,10 @@ namespace App\Rating\Entity; use App\Auth\Entity\User; use Doctrine\ORM\Mapping as ORM; +use App\Rating\Repository\LikeRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: LikeRepository::class)] #[ORM\Table(name: 'likes')] #[ORM\UniqueConstraint(name: 'idx_likes_user_comment', columns: ['user_id', 'comment_id'])] class Like diff --git a/src/Rating/Entity/Rate.php b/src/Rating/Entity/Rate.php index 949a0396..2278081e 100644 --- a/src/Rating/Entity/Rate.php +++ b/src/Rating/Entity/Rate.php @@ -5,9 +5,10 @@ namespace App\Rating\Entity; use App\Auth\Entity\User; use App\Doctor\Entity\Doctor; use Doctrine\ORM\Mapping as ORM; +use App\Rating\Repository\RateRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: RateRepository::class)] #[ORM\Table(name: 'rates')] #[ORM\UniqueConstraint(name: 'idx_rates_user_doctor', columns: ['user_id', 'doctor_id'])] class Rate diff --git a/src/Representation/Entity/Representation.php b/src/Representation/Entity/Representation.php index 2060e4ff..1ba9de8e 100644 --- a/src/Representation/Entity/Representation.php +++ b/src/Representation/Entity/Representation.php @@ -4,9 +4,10 @@ namespace App\Representation\Entity; use App\Auth\Entity\User; use Doctrine\ORM\Mapping as ORM; +use App\Representation\Repository\RepresentationRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: RepresentationRepository::class)] #[ORM\Table(name: 'representations')] class Representation { diff --git a/src/Secretary/Entity/DoctorSecretary.php b/src/Secretary/Entity/DoctorSecretary.php index 5bc4e538..897dbf5a 100644 --- a/src/Secretary/Entity/DoctorSecretary.php +++ b/src/Secretary/Entity/DoctorSecretary.php @@ -5,10 +5,11 @@ namespace App\Secretary\Entity; use App\Auth\Entity\User; use App\Clinic\Entity\Clinic; use App\Doctor\Entity\Doctor; +use App\Secretary\Repository\DoctorSecretaryRepository; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: DoctorSecretaryRepository::class)] #[ORM\Table(name: 'doctor_secretaries')] #[ORM\UniqueConstraint(name: 'idx_doctor_secretary_scope', columns: ['doctor_id', 'secretary_id', 'owner_type'])] class DoctorSecretary diff --git a/src/Settlement/Entity/FinancialBreakdown.php b/src/Settlement/Entity/FinancialBreakdown.php index 37494428..4f997560 100644 --- a/src/Settlement/Entity/FinancialBreakdown.php +++ b/src/Settlement/Entity/FinancialBreakdown.php @@ -5,9 +5,10 @@ namespace App\Settlement\Entity; use App\Auth\Entity\User; use App\Payment\Entity\Payment; use Doctrine\ORM\Mapping as ORM; +use App\Settlement\Repository\FinancialBreakdownRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: FinancialBreakdownRepository::class)] #[ORM\Table(name: 'financial_breakdowns')] #[ORM\Index(columns: ['representation_id', 'created_at'], name: 'idx_breakdown_rep_date')] #[ORM\Index(columns: ['source', 'created_at'], name: 'idx_breakdown_source_date')] diff --git a/src/Settlement/Entity/Settlement.php b/src/Settlement/Entity/Settlement.php index 45d0cda2..9ab155f4 100644 --- a/src/Settlement/Entity/Settlement.php +++ b/src/Settlement/Entity/Settlement.php @@ -4,9 +4,10 @@ namespace App\Settlement\Entity; use App\Auth\Entity\User; use Doctrine\ORM\Mapping as ORM; +use App\Settlement\Repository\SettlementRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: SettlementRepository::class)] #[ORM\Table(name: 'settlements')] #[ORM\Index(columns: ['user_id', 'status'], name: 'idx_settlements_user_status')] class Settlement diff --git a/src/Settlement/Entity/WalletTransaction.php b/src/Settlement/Entity/WalletTransaction.php index ad828ab9..f61b2a32 100644 --- a/src/Settlement/Entity/WalletTransaction.php +++ b/src/Settlement/Entity/WalletTransaction.php @@ -5,9 +5,10 @@ namespace App\Settlement\Entity; use App\Auth\Entity\User; use App\Payment\Entity\Payment; use Doctrine\ORM\Mapping as ORM; +use App\Settlement\Repository\WalletTransactionRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: WalletTransactionRepository::class)] #[ORM\Table(name: 'wallet_transactions')] #[ORM\Index(columns: ['user_id', 'created_at'], name: 'idx_wallet_user_date')] class WalletTransaction diff --git a/src/Sms/Entity/SmsLog.php b/src/Sms/Entity/SmsLog.php index 487174c9..51bfdc61 100644 --- a/src/Sms/Entity/SmsLog.php +++ b/src/Sms/Entity/SmsLog.php @@ -3,9 +3,10 @@ namespace App\Sms\Entity; use Doctrine\ORM\Mapping as ORM; +use App\Sms\Repository\SmsLogRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: SmsLogRepository::class)] #[ORM\Table(name: 'sms_logs')] #[ORM\Index(columns: ['mobile', 'created_at'], name: 'idx_sms_logs_mobile')] class SmsLog diff --git a/src/Sms/Entity/SmsMessageTemplate.php b/src/Sms/Entity/SmsMessageTemplate.php index dca225fe..6c5d8a17 100644 --- a/src/Sms/Entity/SmsMessageTemplate.php +++ b/src/Sms/Entity/SmsMessageTemplate.php @@ -4,11 +4,12 @@ namespace App\Sms\Entity; use Doctrine\ORM\Mapping as ORM; +use App\Sms\Repository\SmsMessageTemplateRepository; /** * متن ویرایش‌پذیرِ پیامک‌های سیستمی، کلیددار با تگ (SmsLog::TAG_*). * body شامل placeholderهای {key} است که هنگام ارسال جایگزین می‌شوند. */ -#[ORM\Entity] +#[ORM\Entity(repositoryClass: SmsMessageTemplateRepository::class)] #[ORM\Table(name: 'sms_message_templates')] class SmsMessageTemplate { diff --git a/src/Sms/Entity/SmsTemplate.php b/src/Sms/Entity/SmsTemplate.php index a7c74226..28d89842 100644 --- a/src/Sms/Entity/SmsTemplate.php +++ b/src/Sms/Entity/SmsTemplate.php @@ -3,9 +3,10 @@ namespace App\Sms\Entity; use Doctrine\ORM\Mapping as ORM; +use App\Sms\Repository\SmsTemplateRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: SmsTemplateRepository::class)] #[ORM\Table(name: 'sms_templates')] class SmsTemplate { diff --git a/src/UserProfile/Entity/UserProfile.php b/src/UserProfile/Entity/UserProfile.php index 539e924d..180098fd 100644 --- a/src/UserProfile/Entity/UserProfile.php +++ b/src/UserProfile/Entity/UserProfile.php @@ -4,9 +4,10 @@ namespace App\UserProfile\Entity; use App\Auth\Entity\User; use Doctrine\ORM\Mapping as ORM; +use App\UserProfile\Repository\UserProfileRepository; use Symfony\Component\Uid\Uuid; -#[ORM\Entity] +#[ORM\Entity(repositoryClass: UserProfileRepository::class)] #[ORM\Table(name: 'profiles')] #[ORM\UniqueConstraint(name: 'idx_profiles_user', columns: ['user_id'])] #[ORM\UniqueConstraint(name: 'uniq_profiles_national_code', columns: ['national_code'])]