Files
clinicpro/docs/tasks/task-04-blog/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

1.7 KiB

معماری — تسک ۰۴: ماژول بلاگ

ساختار فایل‌ها

src/Module/Blog/
├── Controller/
│   ├── BlogController.php       ← CRUD بلاگ
│   └── BlogImageController.php  ← آپلود تصویر
├── Service/
│   ├── BlogService.php
│   └── ImageUploadService.php
├── Repository/
│   └── BlogRepository.php
├── Entity/
│   └── Blog.php
├── DTO/
│   ├── Request/
│   │   ├── CreateBlogRequest.php
│   │   └── UpdateBlogRequest.php
│   └── Response/
│       ├── BlogResponse.php
│       └── BlogListResponse.php
└── Voter/
    └── BlogVoter.php

Entity: Blog

#[ORM\Entity]
#[ORM\Table(name: 'blogs')]
class Blog
{
    #[ORM\Id, ORM\GeneratedValue, ORM\Column]
    private int $id;

    #[ORM\Column(type: UuidType::NAME, unique: true)]
    private Uuid $uuid;

    #[ORM\ManyToOne(targetEntity: User::class)]
    #[ORM\JoinColumn(nullable: false)]
    private User $author;

    #[ORM\Column(length: 300)]
    private string $title;

    #[ORM\Column(length: 300, unique: true)]
    private string $slug;

    #[ORM\Column(type: 'text')]
    private string $body;

    #[ORM\Column(type: 'text', nullable: true)]
    private ?string $summary;

    #[ORM\Column(length: 20, default: 'draft')]
    private string $status; // draft, published, archived

    #[ORM\Column(type: 'integer', default: 0)]
    private int $viewCount = 0;

    #[ORM\Column(length: 255, nullable: true)]
    private ?string $imagePath;

    #[ORM\ManyToMany(targetEntity: Category::class)]
    #[ORM\JoinTable(name: 'blog_tags')]
    private Collection $tags;

    // TimestampableTrait
}