# معماری — تسک ۰۶: ماژول کلینیک ## ساختار فایل‌ها ``` src/Module/Clinic/ ├── Controller/ │ ├── ClinicController.php ← CRUD + لیست │ └── ClinicImageController.php ← آپلود تصویر و لوگو ├── Service/ │ └── ClinicService.php ├── Repository/ │ └── ClinicRepository.php ├── Entity/ │ ├── Clinic.php │ └── ClinicDoctor.php ← رابطه کلینیک-دکتر ├── DTO/ │ ├── Request/ │ │ ├── CreateClinicRequest.php │ │ └── UpdateClinicRequest.php │ └── Response/ │ ├── ClinicResponse.php │ └── ClinicDoctorListResponse.php └── Voter/ └── ClinicVoter.php ``` ## Entity: Clinic ```php #[ORM\Entity] #[ORM\Table(name: 'clinics')] class Clinic { #[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 $owner; #[ORM\Column(length: 200)] private string $name; #[ORM\Column(type: 'text', nullable: true)] private ?string $description; #[ORM\Column(length: 20, nullable: true)] private ?string $phone; #[ORM\Column(type: 'text', nullable: true)] private ?string $address; #[ORM\Column(length: 100, nullable: true)] private ?string $city; #[ORM\Column(length: 255, nullable: true)] private ?string $imagePath; // تصویر اصلی #[ORM\Column(length: 255, nullable: true)] private ?string $logoPath; // لوگو #[ORM\ManyToMany(targetEntity: Doctor::class)] #[ORM\JoinTable(name: 'clinic_doctors')] private Collection $doctors; // TimestampableTrait } ```