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.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
# پایگاه داده — تسک ۱۱: ماژول بیمه
|
||||
|
||||
## توضیح
|
||||
در Drupal، بیمهها به عنوان دستهبندی (`category` entity) ذخیره میشوند:
|
||||
- bundle=`insurance_type` → بیمههای پایه
|
||||
- bundle=`supplementary_insurance` → بیمههای تکمیلی
|
||||
|
||||
رابطه doctor-insurance از طریق `field_insurance` روی bundle=clinic در Drupal موجود است (نه مستقیم روی doctor).
|
||||
در profile کاربر: `field_basic_insurance` و `field_supplementary_insurance` (entity ref → category).
|
||||
|
||||
## جدول: doctor_insurances (رابطه doctor ↔ insurance)
|
||||
_(از endpoint واقعی: PATCH /api/v1/insurance/1 دارای field_price است)_
|
||||
|
||||
| ستون | نوع | نام Drupal | توضیح |
|
||||
|------|-----|-----------|-------|
|
||||
| id | INT AUTO_INCREMENT PK | id | |
|
||||
| doctor_id | INT FK → doctors.id CASCADE | field_doctor | دکتر |
|
||||
| category_id | INT FK → categories.id | field_insurance_type | نوع بیمه (bundle=insurance_type یا supplementary_insurance) |
|
||||
| price | INT NULL | field_price | مبلغ ویزیت با این بیمه (تومان — اختیاری) |
|
||||
|
||||
## ایندکسها
|
||||
```sql
|
||||
CREATE UNIQUE INDEX idx_doctor_insurance ON doctor_insurances(doctor_id, category_id);
|
||||
CREATE INDEX idx_doctor_insurance_cat ON doctor_insurances(category_id);
|
||||
```
|
||||
|
||||
## نکات مهم
|
||||
- دادههای بیمه در جدول `categories` ذخیره میشوند — نه جدول جداگانه
|
||||
- `clinic_insurances` هم وجود دارد: رابطه clinic ↔ insurance (تسک ۰۶)
|
||||
- بیمه کاربر در `profiles` ذخیره میشود: field_basic_insurance, field_supplementary_insurance (تسک ۰۳)
|
||||
- هیچ timestamp در این pivot table لازم نیست
|
||||
Reference in New Issue
Block a user