<?phpnamespace App\Entity;use App\Repository\ComptaTypeRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ComptaTypeRepository::class) */class ComptaType{ const REDUCTION = "reduction"; const ADHESION = "Frais Adhésion"; /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\OneToMany(targetEntity=Compta::class, mappedBy="comptaType") */ private $comptas; /** * @ORM\Column(type="string", length=255) */ private $typeOperation; public function __construct() { $this->comptas = 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|Compta[] */ public function getComptas(): Collection { return $this->comptas; } public function addCompta(Compta $compta): self { if (!$this->comptas->contains($compta)) { $this->comptas[] = $compta; $compta->setComptaType($this); } return $this; } public function removeCompta(Compta $compta): self { if ($this->comptas->removeElement($compta)) { // set the owning side to null (unless already changed) if ($compta->getComptaType() === $this) { $compta->setComptaType(null); } } return $this; } public function getTypeOperation(): ?string { return $this->typeOperation; } public function setTypeOperation(string $typeOperation): self { $this->typeOperation = $typeOperation; return $this; }}