*/ #[ORM\OneToMany(mappedBy: 'sddRegime', targetEntity: BillPayment::class, cascade: [], orphanRemoval: false)] protected Collection $billPayments; #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'], inversedBy: 'sddRegieFile')] #[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')] protected ?File $file; #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'], inversedBy: 'sddRegieBordereau')] #[ORM\JoinColumn(nullable: true, onDelete: 'SET NULL')] protected ?File $bordereau; public function __construct() { $this->billPayments = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getBillPayments(): Collection { return $this->billPayments; } public function addBillPayment(BillPayment $billPayment): self { if (!$this->billPayments->contains($billPayment)) { $this->billPayments[] = $billPayment; $billPayment->setSddRegie($this); } return $this; } public function removeBillPayment(BillPayment $billPayment): self { if ($this->billPayments->removeElement($billPayment)) { // $billPayment->setSddBank(null); // TODO: actuellement, pas nullable: conserver? } return $this; } public function getFile(): ?File { return $this->file; } public function setFile(?File $file): self { $this->file = $file; return $this; } public function getBordereau(): ?File { return $this->bordereau; } public function setBordereau(?File $bordereau): self { $this->bordereau = $bordereau; return $this; } }