<?php
namespace App\Entity;
use App\Entity\CustomsBroker\ContactPerson;
use App\Repository\CustomsBrokerRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=CustomsBrokerRepository::class)
*/
class CustomsBroker
{
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="string", length=255)
*/
private $name;
/**
* @ORM\Column(type="text")
*/
private $address;
/**
* @ORM\Column(type="string", length=255)
*/
private $customsAgent;
/**
* @ORM\Column(type="string", length=255)
*/
private $generalDirectorName;
/**
* @ORM\Column(type="string", length=255)
*/
private $generalDirectorPhone;
/**
* @ORM\Column(type="boolean")
*/
private $enabled;
/**
* @ORM\Column(type="boolean")
*/
private $isMoral;
/**
* @ORM\Column(type="string", length=255)
*/
private $customsAgentPatentNumber;
/**
* @ORM\Column(type="string", length=255)
*/
private $rfc;
/**
* @ORM\Column(type="string", length=255)
*/
private $generalDirectorEmail;
/**
* @ORM\OneToMany(targetEntity=ContactPerson::class, mappedBy="customsBroker", cascade={"persist"})
*/
private $contactPeople;
public function __construct()
{
$this->contactPeople = 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;
}
public function getAddress(): ?string
{
return $this->address;
}
public function setAddress(string $address): self
{
$this->address = $address;
return $this;
}
public function getCustomsAgent(): ?string
{
return $this->customsAgent;
}
public function setCustomsAgent(string $customsAgent): self
{
$this->customsAgent = $customsAgent;
return $this;
}
public function getGeneralDirectorName(): ?string
{
return $this->generalDirectorName;
}
public function setGeneralDirectorName(string $generalDirectorName): self
{
$this->generalDirectorName = $generalDirectorName;
return $this;
}
public function getGeneralDirectorPhone(): ?string
{
return $this->generalDirectorPhone;
}
public function setGeneralDirectorPhone(string $generalDirectorPhone): self
{
$this->generalDirectorPhone = $generalDirectorPhone;
return $this;
}
public function isEnabled(): ?bool
{
return $this->enabled;
}
public function setEnabled(bool $enabled): self
{
$this->enabled = $enabled;
return $this;
}
public function isIsMoral(): ?bool
{
return $this->isMoral;
}
public function setIsMoral(bool $isMoral): self
{
$this->isMoral = $isMoral;
return $this;
}
public function getCustomsAgentPatentNumber(): ?string
{
return $this->customsAgentPatentNumber;
}
public function setCustomsAgentPatentNumber(string $customsAgentPatentNumber): self
{
$this->customsAgentPatentNumber = $customsAgentPatentNumber;
return $this;
}
public function getRfc(): ?string
{
return $this->rfc;
}
public function setRfc(string $rfc): self
{
$this->rfc = $rfc;
return $this;
}
public function getGeneralDirectorEmail(): ?string
{
return $this->generalDirectorEmail;
}
public function setGeneralDirectorEmail(string $generalDirectorEmail): self
{
$this->generalDirectorEmail = $generalDirectorEmail;
return $this;
}
/**
* @return Collection<int, ContactPerson>
*/
public function getContactPeople(): Collection
{
return $this->contactPeople;
}
public function addContactPerson(ContactPerson $contactPerson): self
{
if (!$this->contactPeople->contains($contactPerson)) {
$this->contactPeople[] = $contactPerson;
$contactPerson->setCustomsBroker($this);
}
return $this;
}
public function removeContactPerson(ContactPerson $contactPerson): self
{
if ($this->contactPeople->removeElement($contactPerson)) {
// set the owning side to null (unless already changed)
if ($contactPerson->getCustomsBroker() === $this) {
$contactPerson->setCustomsBroker(null);
}
}
return $this;
}
}