<?php
namespace App\Entity;
use App\Repository\VestigingRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Entity(repositoryClass: VestigingRepository::class)]
class Vestiging
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255)]
private ?string $name = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $adres = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $postcode = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $plaats = null;
#[ORM\Column(length: 20, nullable: true)]
private ?string $telefoon = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email = null;
#[ORM\Column(length: 25)]
private ?string $codenaam = null;
#[ORM\Column(length: 3)]
private ?string $codeletter = null;
#[ORM\OneToMany(mappedBy: 'vestiging', targetEntity: Prospect::class)]
private Collection $prospects;
#[ORM\OneToMany(mappedBy: 'vestiging', targetEntity: Reminder::class)]
private Collection $reminders;
#[ORM\Column(length: 15)]
private ?string $colorRgb = null;
public function __construct()
{
$this->prospects = new ArrayCollection();
$this->reminders = new ArrayCollection();
}
public function __toString(): string
{
return $this->codenaam;
}
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;
}
public function getAdres(): ?string
{
return $this->adres;
}
public function setAdres(?string $adres): self
{
$this->adres = $adres;
return $this;
}
public function getPostcode(): ?string
{
return $this->postcode;
}
public function setPostcode(?string $postcode): self
{
$this->postcode = $postcode;
return $this;
}
public function getPlaats(): ?string
{
return $this->plaats;
}
public function setPlaats(?string $plaats): self
{
$this->plaats = $plaats;
return $this;
}
public function getTelefoon(): ?string
{
return $this->telefoon;
}
public function setTelefoon(?string $telefoon): self
{
$this->telefoon = $telefoon;
return $this;
}
public function getEmail(): ?string
{
return $this->email;
}
public function setEmail(?string $email): self
{
$this->email = $email;
return $this;
}
public function getCodenaam(): ?string
{
return $this->codenaam;
}
public function setCodenaam(string $codenaam): self
{
$this->codenaam = $codenaam;
return $this;
}
public function getCodeletter(): ?string
{
return $this->codeletter;
}
public function setCodeletter(string $codeletter): self
{
$this->codeletter = $codeletter;
return $this;
}
/**
* @return Collection<int, Prospect>
*/
public function getProspects(): Collection
{
return $this->prospects;
}
public function addProspect(Prospect $prospect): self
{
if (!$this->prospects->contains($prospect)) {
$this->prospects->add($prospect);
$prospect->setVestiging($this);
}
return $this;
}
public function removeProspect(Prospect $prospect): self
{
if ($this->prospects->removeElement($prospect)) {
// set the owning side to null (unless already changed)
if ($prospect->getVestiging() === $this) {
$prospect->setVestiging(null);
}
}
return $this;
}
/**
* @return Collection<int, Reminder>
*/
public function getReminders(): Collection
{
return $this->reminders;
}
public function addReminder(Reminder $reminder): static
{
if (!$this->reminders->contains($reminder)) {
$this->reminders->add($reminder);
$reminder->setVestiging($this);
}
return $this;
}
public function removeReminder(Reminder $reminder): static
{
if ($this->reminders->removeElement($reminder)) {
// set the owning side to null (unless already changed)
if ($reminder->getVestiging() === $this) {
$reminder->setVestiging(null);
}
}
return $this;
}
public function getColorRgb(): ?string
{
return $this->colorRgb;
}
public function setColorRgb(string $colorRgb): static
{
$this->colorRgb = $colorRgb;
return $this;
}
}