# معماری — تسک ۱۳: ماژول لایک ## ساختار فایل‌ها ``` 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 } ```