Files
hamed de1a78a235 feat: Implement SMS sending functionality with KavehNegar and Rangineh providers
- Add SendSmsMessage class for encapsulating SMS message data.
- Create KavehNegarProvider and RanginehProvider classes implementing SmsProviderInterface for sending SMS.
- Implement SmsLogRepository and SmsTemplateRepository for managing SMS logs and templates.
- Develop SendSmsHandler for handling SMS sending messages.
- Create SmsService to manage SMS dispatching and logging.
- Add UserProfileController for managing user profiles with CRUD operations.
- Implement UserProfile entity and repository for user profile data management.
- Update symfony.lock and bootstrap.php for project dependencies and environment setup.
2026-06-09 22:00:34 +03:30

3.6 KiB
Raw Permalink Blame History

پایگاه داده — تسک ۰۶: ماژول کلینیک

جدول: clinics

(entity_type=clinic_pro, bundle=clinic — از config تأیید شده)

ستون نوع نام Drupal توضیح
id INT UNSIGNED AUTO_INCREMENT PK id
uuid CHAR(36) UNIQUE NOT NULL uuid
user_id INT FK → users.id NOT NULL uid مالک کلینیک
name VARCHAR(255) NULL field_name نام کلینیک
info LONGTEXT NULL field_info توضیحات (نه description!)
address LONGTEXT NULL field_address آدرس
telephone VARCHAR(50) NULL field_telephone تلفن (نه phone!)
is_24_7 TINYINT(1) DEFAULT 0 field_24_7 باز ۲۴/۷
working_days VARCHAR(255) NULL field_working_days روزهای کاری (متن آزاد، مثال: 'شنبه تا سه شنبه ساعت ۱۲:۲۰')
latitude FLOAT NULL field_latitude
longitude FLOAT NULL field_longitude
logo_id INT FK → files.id NULL field_clinic_logo لوگو کلینیک (image, cardinality=1)
city_id INT FK → categories.id NULL field_city شهر (entity ref → category/city)
state_id INT FK → categories.id NULL field_state استان (entity ref → category/state)
representation_id INT FK → representations.id NULL field_agent نماینده کلینیک (entity ref → user — در Drupal به user اشاره دارد، در Symfony به representation)
created_at INT NOT NULL created Unix timestamp
updated_at INT NOT NULL changed Unix timestamp

جدول: clinic_doctors (ManyToMany)

ستون نوع نام Drupal توضیح
clinic_id INT FK → clinics.id CASCADE
doctor_id INT FK → doctors.id CASCADE field_doctors cardinality نامحدود

جدول: clinic_specialties (ManyToMany)

ستون نوع توضیح
clinic_id INT FK → clinics.id CASCADE
category_id INT FK → categories.id field_clinic_specialty

جدول: clinic_services (ManyToMany)

ستون نوع توضیح
clinic_id INT FK → clinics.id CASCADE
category_id INT FK → categories.id field_doctor_services

جدول: clinic_insurances (ManyToMany)

ستون نوع توضیح
clinic_id INT FK → clinics.id CASCADE
category_id INT FK → categories.id field_insurance (insurance_type یا supplementary_insurance bundle)

جدول: clinic_images (تصاویر اضافی)

ستون نوع نام Drupal توضیح
id INT AUTO_INCREMENT PK
clinic_id INT FK → clinics.id CASCADE
file_id INT FK → files.id field_image_clinic حداکثر ۵ تصویر (cardinality=5)
sort_order INT DEFAULT 0 delta ترتیب

ایندکس‌ها

CREATE INDEX idx_clinics_owner ON clinics(user_id);
CREATE INDEX idx_clinics_city ON clinics(city_id);
CREATE INDEX idx_clinics_state ON clinics(state_id);
CREATE INDEX idx_clinics_representation ON clinics(representation_id);

نکات مهم

  • field_agent در Drupal به user اشاره دارد (cardinality=-1 نامحدود) — در Symfony ساده‌تر شده و فقط یک representation دارد
  • field_working_days متن آزاد است، مثل 'شنبه تا سه‌شنبه ۸ تا ۱۲'، نه فرمت ساختاریافته
  • field_telephone نه phone — اسم فیلد از Drupal config گرفته شده