- 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.
70 lines
1.8 KiB
Markdown
70 lines
1.8 KiB
Markdown
# معماری — تسک ۰۶: ماژول کلینیک
|
|
|
|
## ساختار فایلها
|
|
```
|
|
src/Module/Clinic/
|
|
├── Controller/
|
|
│ ├── ClinicController.php ← CRUD + لیست
|
|
│ └── ClinicImageController.php ← آپلود تصویر و لوگو
|
|
├── Service/
|
|
│ └── ClinicService.php
|
|
├── Repository/
|
|
│ └── ClinicRepository.php
|
|
├── Entity/
|
|
│ ├── Clinic.php
|
|
│ └── ClinicDoctor.php ← رابطه کلینیک-دکتر
|
|
├── DTO/
|
|
│ ├── Request/
|
|
│ │ ├── CreateClinicRequest.php
|
|
│ │ └── UpdateClinicRequest.php
|
|
│ └── Response/
|
|
│ ├── ClinicResponse.php
|
|
│ └── ClinicDoctorListResponse.php
|
|
└── Voter/
|
|
└── ClinicVoter.php
|
|
```
|
|
|
|
## Entity: Clinic
|
|
```php
|
|
#[ORM\Entity]
|
|
#[ORM\Table(name: 'clinics')]
|
|
class Clinic
|
|
{
|
|
#[ORM\Id, ORM\GeneratedValue, ORM\Column]
|
|
private int $id;
|
|
|
|
#[ORM\Column(type: UuidType::NAME, unique: true)]
|
|
private Uuid $uuid;
|
|
|
|
#[ORM\ManyToOne(targetEntity: User::class)]
|
|
private User $owner;
|
|
|
|
#[ORM\Column(length: 200)]
|
|
private string $name;
|
|
|
|
#[ORM\Column(type: 'text', nullable: true)]
|
|
private ?string $description;
|
|
|
|
#[ORM\Column(length: 20, nullable: true)]
|
|
private ?string $phone;
|
|
|
|
#[ORM\Column(type: 'text', nullable: true)]
|
|
private ?string $address;
|
|
|
|
#[ORM\Column(length: 100, nullable: true)]
|
|
private ?string $city;
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $imagePath; // تصویر اصلی
|
|
|
|
#[ORM\Column(length: 255, nullable: true)]
|
|
private ?string $logoPath; // لوگو
|
|
|
|
#[ORM\ManyToMany(targetEntity: Doctor::class)]
|
|
#[ORM\JoinTable(name: 'clinic_doctors')]
|
|
private Collection $doctors;
|
|
|
|
// TimestampableTrait
|
|
}
|
|
```
|