<?php
namespace App\Entity;
use App\Repository\DevisLuggageRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DevisLuggageRepository::class)
*/
class DevisLuggage
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\OneToMany(targetEntity=Devis::class, mappedBy="devisLuggage")
*/
private $devis;
public function __construct()
{
$this->devis = new ArrayCollection();
}
public function getId(): ?int
{
return $this->id;
}
public function getName(): ?string
{
return $this->name;
}
public function setName(string $name): self
{
$this->name = $name;
return $this;
}
/**
* @return Collection<int, Devis>
*/
public function getDevis(): Collection
{
return $this->devis;
}
public function addDevi(Devis $devi): self
{
if (!$this->devis->contains($devi)) {
$this->devis[] = $devi;
$devi->setDevisLuggage($this);
}
return $this;
}
public function removeDevi(Devis $devi): self
{
if ($this->devis->removeElement($devi)) {
// set the owning side to null (unless already changed)
if ($devi->getDevisLuggage() === $this) {
$devi->setDevisLuggage(null);
}
}
return $this;
}
}