Files
clinicpro/docs/tasks/task-03-user-profile/architecture.md
T
hamed de1a78a235 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.
2026-06-09 22:00:34 +03:30

104 lines
2.7 KiB
Markdown

# معماری — تسک ۰۳: ماژول پروفایل کاربر
## ساختار فایل‌ها
```
src/Module/UserProfile/
├── Controller/
│ └── UserProfileController.php
├── Service/
│ └── UserProfileService.php
├── Repository/
│ └── UserProfileRepository.php
├── Entity/
│ └── UserProfile.php
├── DTO/
│ ├── Request/
│ │ ├── CreateUserProfileRequest.php
│ │ └── UpdateUserProfileRequest.php
│ └── Response/
│ └── UserProfileResponse.php
└── Voter/
└── UserProfileVoter.php
```
## Entity: UserProfile
```php
#[ORM\Entity]
#[ORM\Table(name: 'user_profiles')]
class UserProfile
{
#[ORM\Id, ORM\GeneratedValue, ORM\Column]
private int $id;
#[ORM\Column(type: UuidType::NAME, unique: true)]
private Uuid $uuid;
#[ORM\OneToOne(targetEntity: User::class)]
#[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')]
private User $user;
#[ORM\Column(length: 200, nullable: true)]
private ?string $name;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $description;
#[ORM\Column(length: 20, nullable: true)]
private ?string $birthday;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $basicInsurance;
#[ORM\Column(length: 30, nullable: true)]
private ?string $bloodType;
#[ORM\Column(length: 50, nullable: true)]
private ?string $education;
#[ORM\Column(length: 100, nullable: true)]
private ?string $fathersName;
#[ORM\Column(length: 10, nullable: true)]
private ?string $gender;
#[ORM\Column(length: 20, nullable: true)]
private ?string $homePhone;
#[ORM\Column(length: 100, nullable: true)]
private ?string $job;
#[ORM\Column(length: 30, nullable: true)]
private ?string $maritalStatus;
#[ORM\Column(length: 50, nullable: true)]
private ?string $supplementaryInsurance;
#[ORM\Column(length: 20, nullable: true)]
private ?string $workPhone;
#[ORM\Column(type: 'text', nullable: true)]
private ?string $address;
// اطلاعات پزشکی پیچیده به صورت JSON
#[ORM\Column(type: 'json', nullable: true)]
private ?array $diseases;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $allergies;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $medications;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $surgeries;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $familyHistory;
#[ORM\Column(type: 'json', nullable: true)]
private ?array $relatives;
// TimestampableTrait
}
```