- 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.
1.8 KiB
1.8 KiB
پایگاه داده — تسک ۱۴: ماژول منشی
جدول: doctor_secretaries
(entity_type=clinic_pro, bundle=doctor_secretary — از 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 | مالک رکورد |
| doctor_id | INT FK → doctors.id NOT NULL | field_doctor | دکتر (entity ref → clinic_pro/doctor) |
| secretary_id | INT FK → users.id NOT NULL | field_secretary | منشی (entity ref → user) |
| telephone | VARCHAR(50) NULL | field_telephone | تلفن تماس منشی |
| permission | LONGTEXT NULL | field_permission | مجوزها (JSON یا متن) |
| active | TINYINT(1) DEFAULT 1 | field_active | فعال/غیرفعال (نه status VARCHAR!) |
| created_at | INT NOT NULL | created | Unix timestamp |
| updated_at | INT NOT NULL | changed | Unix timestamp |
ایندکسها
CREATE UNIQUE INDEX idx_secretary_doctor_user ON doctor_secretaries(doctor_id, secretary_id);
CREATE INDEX idx_secretary_doctor ON doctor_secretaries(doctor_id);
CREATE INDEX idx_secretary_user ON doctor_secretaries(secretary_id);
نکات مهم
- فیلد وضعیت:
active(TINYINT boolean) — نهstatusبا مقادیر string field_permissionنوع string_long است (LONGTEXT)، میتواند JSON یا متن ساده باشدdoctor_id→ FK به doctors.id (نه clinic_pro.id) — در Symfony به entity doctor اشاره میکندsecretary_id→ FK به users.id — کاربری که نقش منشی دارد- UNIQUE(doctor_id, secretary_id): یک منشی نمیتواند دو بار برای یک دکتر ثبت شود