# معماری — تسک ۱۱: ماژول بیمه ## ساختار فایل‌ها ``` src/Module/Insurance/ ├── Controller/ │ └── InsuranceController.php ├── Service/ │ └── InsuranceService.php ├── Repository/ │ └── InsuranceRepository.php ├── Entity/ │ └── Insurance.php └── DTO/ ├── Request/ │ ├── CreateInsuranceRequest.php │ └── UpdateInsuranceRequest.php └── Response/ └── InsuranceResponse.php ``` ## Entity: Insurance ```php #[ORM\Entity] #[ORM\Table(name: 'doctor_insurances')] class Insurance { #[ORM\Id, ORM\GeneratedValue, ORM\Column] private int $id; #[ORM\ManyToOne(targetEntity: Doctor::class)] #[ORM\JoinColumn(nullable: false, onDelete: 'CASCADE')] private Doctor $doctor; #[ORM\ManyToOne(targetEntity: Category::class)] #[ORM\JoinColumn(nullable: false)] private Category $insuranceCategory; // از جدول categories #[ORM\Column(type: 'boolean', default: true)] private bool $isActive = true; // TimestampableTrait } ```