- 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.
47 lines
974 B
Markdown
47 lines
974 B
Markdown
# معماری — تسک ۱۳: ماژول لایک
|
|
|
|
## ساختار فایلها
|
|
```
|
|
src/Module/Like/
|
|
├── Controller/
|
|
│ └── LikeController.php
|
|
├── Service/
|
|
│ └── LikeService.php
|
|
├── Repository/
|
|
│ └── LikeRepository.php
|
|
├── Entity/
|
|
│ └── Like.php
|
|
└── DTO/
|
|
└── Request/
|
|
└── CreateLikeRequest.php
|
|
```
|
|
|
|
## Entity: Like
|
|
```php
|
|
#[ORM\Entity]
|
|
#[ORM\Table(name: 'likes')]
|
|
class Like
|
|
{
|
|
#[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 $user;
|
|
|
|
// نوع موجودیت: blog, doctor
|
|
#[ORM\Column(length: 30)]
|
|
private string $entityType;
|
|
|
|
#[ORM\Column(type: 'integer')]
|
|
private int $entityId;
|
|
|
|
#[ORM\Column(type: 'boolean', default: true)]
|
|
private bool $isLiked;
|
|
|
|
// TimestampableTrait
|
|
}
|
|
```
|