- 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.
3.5 KiB
3.5 KiB
پایگاه داده — تسک ۰۸: ماژول دستهبندیها
ساختار واقعی از DB backup
جدول category یک entity با چند bundle است.
بیشتر دادهها (استانها، شهرها، تخصصها) در INSERTهای DB backup موجودند.
جدول: categories
(entity_type=category — از DB backup تأیید شده)
| ستون | نوع | نام Drupal | توضیح |
|---|---|---|---|
| id | INT UNSIGNED AUTO_INCREMENT PK | id | |
| uuid | CHAR(36) UNIQUE NOT NULL | uuid | |
| bundle | VARCHAR(32) NOT NULL | bundle | نوع دستهبندی |
| label | VARCHAR(255) NULL | label | نام (base field) |
| status | TINYINT(1) DEFAULT 1 | status | فعال/غیرفعال |
| parent_id | INT FK → categories.id NULL | field_parent | والد (استان→شهر / تخصص والد) |
| weight | INT DEFAULT 0 | field_weight | ترتیب نمایش |
| logo_id | INT FK → files.id NULL | field_logo | تصویر/آیکون (برای بیمهها) |
| title | VARCHAR(255) NULL | field_title | عنوان جایگزین |
| representation_id | INT FK → representations.id NULL | field_representation | نماینده مرتبط (برای city bundle) |
فیلدهای اختصاصی bundle=city
(فقط برای city bundle — از config تأیید شده)
| ستون | نوع | نام Drupal | توضیح |
|---|---|---|---|
| contact_phone | VARCHAR(255) NULL | field_contactphone | تلفن |
| VARCHAR(255) NULL | field_email | ایمیل | |
| description | TEXT NULL | field_description | توضیحات |
| slogan | VARCHAR(255) NULL | field_slogan | شعار |
| domain | VARCHAR(255) NULL | field_domain | دامنه اختصاصی شهر |
| keywords | VARCHAR(255) NULL | field_keywords | کلیدواژه SEO |
| footer_description | TEXT NULL | field_footerdescription | توضیحات footer |
| footer_disclaimer | TEXT NULL | field_footerdisclaimer | سلب مسئولیت |
| social_media | LONGTEXT NULL | field_socialmedia | شبکههای اجتماعی (JSON) |
مقادیر مجاز bundle
state → استان (31 استان ایران — داده در DB موجود)
city → شهر (parent_id = state_id)
specially_doctor → تخصص پزشکی
doctor_services → سرویسهای پزشکی
insurance_type → نوع بیمه پایه
supplementary_insurance → بیمه تکمیلی
tag → تگ بلاگ
ایندکسها
CREATE INDEX idx_categories_bundle ON categories(bundle);
CREATE INDEX idx_categories_parent ON categories(parent_id);
CREATE INDEX idx_categories_status ON categories(status, bundle);
دادههای موجود در DB backup (نمونه)
استانها: id=1..100 (bundle='state') — تمام ۳۱ استان ایران
شهرها: id=101..2503 (bundle='city') — شهرهای ایران
دادهها باید از DB backup به Symfony fixtures مهاجرت داده شوند.
نکته مهم: city bundle
City bundle فیلدهای زیادی دارد که برای نمایش اطلاعات سایت نماینده استفاده میشوند:
field_representation→ لینک به نماینده (multi-tenant)field_domain→ دامنه اختصاصی شهرfield_slogan,field_keywords→ SEO این فیلدها در Symfony در جدول جداگانهcity_settingsیا در همان categories با nullable columns نگهداشته میشوند.