src/Entity/Currency.php line 11
<?phpnamespace App\Entity;use App\Repository\CurrencyRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: CurrencyRepository::class)]class Currency{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 25)]private ?string $short = null;#[ORM\Column(length: 100)]private ?string $name = null;#[ORM\OneToMany(mappedBy: 'currency', targetEntity: Entreprise::class)]private Collection $entreprises;public function __construct(){$this->entreprises = new ArrayCollection();}public function getId(): ?int{return $this->id;}public function getShort(): ?string{return $this->short;}public function setShort(string $short): static{$this->short = $short;return $this;}public function getName(): ?string{return $this->name;}public function setName(string $name): static{$this->name = $name;return $this;}/*** @return Collection<int, Entreprise>*/public function getEntreprises(): Collection{return $this->entreprises;}public function addEntreprise(Entreprise $entreprise): static{if (!$this->entreprises->contains($entreprise)) {$this->entreprises->add($entreprise);$entreprise->setCurrency($this);}return $this;}public function removeEntreprise(Entreprise $entreprise): static{if ($this->entreprises->removeElement($entreprise)) {// set the owning side to null (unless already changed)if ($entreprise->getCurrency() === $this) {$entreprise->setCurrency(null);}}return $this;}}