- 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.3 KiB
3.3 KiB
معماری — تسک ۰۹: ماژول تنظیمات نوبتدهی
ساختار فایلها
src/Module/AppointmentSettings/
├── Controller/
│ ├── WeeklyScheduleController.php
│ ├── DateOverrideController.php
│ └── HolidayController.php
├── Service/
│ ├── WeeklyScheduleService.php
│ ├── DateOverrideService.php
│ └── HolidayService.php
├── Repository/
│ ├── WeeklyScheduleRepository.php
│ ├── DateOverrideRepository.php
│ └── HolidayRepository.php
├── Entity/
│ ├── WeeklySchedule.php
│ ├── DateOverride.php
│ └── Holiday.php
└── DTO/
├── Request/
│ ├── CreateWeeklyScheduleRequest.php
│ ├── CreateDateOverrideRequest.php
│ └── CreateHolidayRequest.php
└── Response/
├── WeeklyScheduleResponse.php
└── DateOverrideResponse.php
Entity: WeeklySchedule
#[ORM\Entity]
#[ORM\Table(name: 'weekly_schedules')]
class WeeklySchedule
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column]
private int $id;
#[ORM\Column(type: UuidType::NAME, unique: true)]
private Uuid $uuid;
#[ORM\OneToOne(targetEntity: Doctor::class)]
private Doctor $doctor;
// هر روز هفته یک JSON: {active, slots: [{start, end, duration}]}
#[ORM\Column(type: 'json')]
private array $saturday = ['active' => false, 'slots' => []];
#[ORM\Column(type: 'json')]
private array $sunday = ['active' => false, 'slots' => []];
#[ORM\Column(type: 'json')]
private array $monday = ['active' => false, 'slots' => []];
#[ORM\Column(type: 'json')]
private array $tuesday = ['active' => false, 'slots' => []];
#[ORM\Column(type: 'json')]
private array $wednesday = ['active' => false, 'slots' => []];
#[ORM\Column(type: 'json')]
private array $thursday = ['active' => false, 'slots' => []];
#[ORM\Column(type: 'json')]
private array $friday = ['active' => false, 'slots' => []];
// TimestampableTrait
}
Entity: DateOverride
#[ORM\Entity]
#[ORM\Table(name: 'date_overrides')]
class DateOverride
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column]
private int $id;
#[ORM\Column(type: UuidType::NAME, unique: true)]
private Uuid $uuid;
#[ORM\ManyToOne(targetEntity: Doctor::class)]
private Doctor $doctor;
#[ORM\Column(type: 'date')]
private \DateTimeInterface $date;
#[ORM\Column(type: 'boolean', default: false)]
private bool $active;
#[ORM\Column(length: 200, nullable: true)]
private ?string $reason;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $customSlots; // [{start, end, duration}]
// TimestampableTrait
}
Entity: Holiday
#[ORM\Entity]
#[ORM\Table(name: 'holidays')]
class Holiday
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column]
private int $id;
#[ORM\Column(type: UuidType::NAME, unique: true)]
private Uuid $uuid;
#[ORM\ManyToOne(targetEntity: Doctor::class)]
private Doctor $doctor;
#[ORM\Column(type: 'date')]
private \DateTimeInterface $startDate;
#[ORM\Column(type: 'date')]
private \DateTimeInterface $endDate;
#[ORM\Column(length: 200, nullable: true)]
private ?string $reason;
// TimestampableTrait
}