<?php
namespace App\Entity;
use App\Repository\FamilieRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Titulatuur;
#[ORM\Entity(repositoryClass: FamilieRepository::class)]
class Familie
{
#[ORM\Id]
#[ORM\GeneratedValue]
#[ORM\Column]
private ?int $id = null;
#[ORM\ManyToOne]
private ?titulatuur $titulatuur = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $naam = null;
#[ORM\Column(length: 100, nullable: true)]
private ?string $voorletters = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $padres = null;
#[ORM\Column(length: 15, nullable: true)]
private ?string $ppostcode = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $pplaats = null;
#[ORM\Column(length: 15, nullable: true)]
private ?string $telefoon = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $fadres = null;
#[ORM\Column(length: 15, nullable: true)]
private ?string $fpostcode = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $fplaats = null;
#[ORM\OneToMany(mappedBy: 'familie', targetEntity: Order::class)]
private Collection $orders;
#[ORM\Column(length: 15, nullable: true)]
private ?string $telefoon2 = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $telefoon2_naam = null;
#[ORM\OneToMany(mappedBy: 'familie', targetEntity: Prospect::class)]
private Collection $prospects;
#[ORM\Column(length: 255, nullable: true)]
private ?string $telefoon_naam = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email2 = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $email2_naam = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $naam_tnv = null;
public function __construct()
{
$this->orders = new ArrayCollection();
$this->prospects = new ArrayCollection();
}
public function __toString()
{
if ($this->titulatuur) $familie['titulatuur'] = $this->titulatuur;
if ($this->voorletters) $familie['voorletters'] = $this->voorletters;
if ($this->naam) $familie['naam'] = $this->naam;
if ($this->padres) $familie['padres'] = $this->padres;
if ($this->ppostcode) $familie['ppostcode'] = $this->ppostcode;
if ($this->pplaats) $familie['pplaats'] = $this->pplaats;
if (isset($familie)) {
return (implode(", ", $familie));
} else
return '';
}
public function getId(): ?int
{
return $this->id;
}
public function getTitulatuur(): ?titulatuur
{
return $this->titulatuur;
}
public function setTitulatuur(?titulatuur $titulatuur): self
{
$this->titulatuur = $titulatuur;
return $this;
}
public function getNaam(): ?string
{
return $this->naam;
}
public function setNaam(?string $naam): self
{
$this->naam = $naam;
return $this;
}
public function getVoorletters(): ?string
{
return $this->voorletters;
}
public function setVoorletters(?string $voorletters): self
{
$this->voorletters = $voorletters;
return $this;
}
public function getPadres(): ?string
{
return $this->padres;
}
public function setPadres(?string $padres): self
{
$this->padres = $padres;
return $this;
}
public function getPpostcode(): ?string
{
return $this->ppostcode;
}
public function setPpostcode(?string $ppostcode): self
{
$this->ppostcode = $ppostcode;
return $this;
}
public function getPplaats(): ?string
{
return $this->pplaats;
}
public function setPplaats(?string $pplaats): self
{
$this->pplaats = $pplaats;
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 getFadres(): ?string
{
return $this->fadres;
}
public function setFadres(?string $fadres): self
{
$this->fadres = $fadres;
return $this;
}
public function getFpostcode(): ?string
{
return $this->fpostcode;
}
public function setFpostcode(?string $fpostcode): self
{
$this->fpostcode = $fpostcode;
return $this;
}
public function getFplaats(): ?string
{
return $this->fplaats;
}
public function setFplaats(?string $fplaats): self
{
$this->fplaats = $fplaats;
return $this;
}
/**
* @return Collection<int, Order>
*/
public function getOrders(): Collection
{
return $this->orders;
}
public function addOrder(Order $order): self
{
if (!$this->orders->contains($order)) {
$this->orders->add($order);
$order->setFamilie($this);
}
return $this;
}
public function removeOrder(Order $order): self
{
if ($this->orders->removeElement($order)) {
// set the owning side to null (unless already changed)
if ($order->getFamilie() === $this) {
$order->setFamilie(null);
}
}
return $this;
}
public function getTelefoon2(): ?string
{
return $this->telefoon2;
}
public function setTelefoon2(?string $telefoon2): self
{
$this->telefoon2 = $telefoon2;
return $this;
}
public function getTelefoon2Naam(): ?string
{
return $this->telefoon2_naam;
}
public function setTelefoon2Naam(?string $telefoon2_naam): self
{
$this->telefoon2_naam = $telefoon2_naam;
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->setFamilie($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->getFamilie() === $this) {
$prospect->setFamilie(null);
}
}
return $this;
}
public function getTelefoonNaam(): ?string
{
return $this->telefoon_naam;
}
public function setTelefoonNaam(?string $telefoon_naam): self
{
$this->telefoon_naam = $telefoon_naam;
return $this;
}
public function getEmail2(): ?string
{
return $this->email2;
}
public function setEmail2(?string $email2): static
{
$this->email2 = $email2;
return $this;
}
public function getEmail2Naam(): ?string
{
return $this->email2_naam;
}
public function setEmail2Naam(?string $email2_naam): static
{
$this->email2_naam = $email2_naam;
return $this;
}
public function getNaamTnv(): ?string
{
return $this->naam_tnv;
}
public function setNaamTnv(?string $naam_tnv): static
{
$this->naam_tnv = $naam_tnv;
return $this;
}
}