<?php
namespace App\Entity;
use App\Repository\DevisEquipmentRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DevisEquipmentRepository::class)
*/
class DevisEquipment
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\ManyToMany(targetEntity=Devis::class, mappedBy="devisEquipment")
*/
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;
}
return $this;
}
public function removeDevis(Devis $devi): self
{
if ($this->devis->removeElement($devi)) {
$devi->removeDevisEquipment($this);
}
return $this;
}
public function removeDevi(Devis $devi): self
{
if ($this->devis->removeElement($devi)) {
$devi->removeDevisEquipment($this);
}
return $this;
}
}