*/ #[ORM\OneToMany(targetEntity: Bill::class, mappedBy: 'jvs', cascade: ['persist'], orphanRemoval: true)] private Collection $bills; #[ORM\OneToOne(targetEntity: File::class, cascade: ['persist'])] protected ?File $file; public function __construct() { $this->bills = new ArrayCollection(); } public function getId(): ?int { return $this->id; } /** * @return Collection */ public function getBills(): Collection { return $this->bills; } public function addBill(Bill $bill): self { if (!$this->bills->contains($bill)) { $this->bills[] = $bill; $bill->setJvs($this); } return $this; } public function removeBill(Bill $bill): self { if ($this->bills->removeElement($bill)) { // set the owning side to null (unless already changed) if ($bill->getJvs() === $this) { $bill->setJvs(null); } } return $this; } public function getFile(): ?File { return $this->file; } public function setFile(?File $file): self { $this->file = $file; return $this; } }