src/Entity/CustomsBroker.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\CustomsBroker\ContactPerson;
  4. use App\Repository\CustomsBrokerRepository;
  5. use Doctrine\Common\Collections\ArrayCollection;
  6. use Doctrine\Common\Collections\Collection;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity(repositoryClass=CustomsBrokerRepository::class)
  10.  */
  11. class CustomsBroker
  12. {
  13.     /**
  14.      * @ORM\Id
  15.      * @ORM\GeneratedValue
  16.      * @ORM\Column(type="integer")
  17.      */
  18.     private $id;
  19.     /**
  20.      * @ORM\Column(type="string", length=255)
  21.      */
  22.     private $name;
  23.     /**
  24.      * @ORM\Column(type="text")
  25.      */
  26.     private $address;
  27.     /**
  28.      * @ORM\Column(type="string", length=255)
  29.      */
  30.     private $customsAgent;
  31.     /**
  32.      * @ORM\Column(type="string", length=255)
  33.      */
  34.     private $generalDirectorName;
  35.     /**
  36.      * @ORM\Column(type="string", length=255)
  37.      */
  38.     private $generalDirectorPhone;
  39.     /**
  40.      * @ORM\Column(type="boolean")
  41.      */
  42.     private $enabled;
  43.     /**
  44.      * @ORM\Column(type="boolean")
  45.      */
  46.     private $isMoral;
  47.     /**
  48.      * @ORM\Column(type="string", length=255)
  49.      */
  50.     private $customsAgentPatentNumber;
  51.     /**
  52.      * @ORM\Column(type="string", length=255)
  53.      */
  54.     private $rfc;
  55.     /**
  56.      * @ORM\Column(type="string", length=255)
  57.      */
  58.     private $generalDirectorEmail;
  59.     /**
  60.      * @ORM\OneToMany(targetEntity=ContactPerson::class, mappedBy="customsBroker", cascade={"persist"})
  61.      */
  62.     private $contactPeople;
  63.     public function __construct()
  64.     {
  65.         $this->contactPeople = new ArrayCollection();
  66.     }
  67.     public function getId(): ?int
  68.     {
  69.         return $this->id;
  70.     }
  71.     public function getName(): ?string
  72.     {
  73.         return $this->name;
  74.     }
  75.     public function setName(string $name): self
  76.     {
  77.         $this->name $name;
  78.         return $this;
  79.     }
  80.     public function getAddress(): ?string
  81.     {
  82.         return $this->address;
  83.     }
  84.     public function setAddress(string $address): self
  85.     {
  86.         $this->address $address;
  87.         return $this;
  88.     }
  89.     public function getCustomsAgent(): ?string
  90.     {
  91.         return $this->customsAgent;
  92.     }
  93.     public function setCustomsAgent(string $customsAgent): self
  94.     {
  95.         $this->customsAgent $customsAgent;
  96.         return $this;
  97.     }
  98.     public function getGeneralDirectorName(): ?string
  99.     {
  100.         return $this->generalDirectorName;
  101.     }
  102.     public function setGeneralDirectorName(string $generalDirectorName): self
  103.     {
  104.         $this->generalDirectorName $generalDirectorName;
  105.         return $this;
  106.     }
  107.     public function getGeneralDirectorPhone(): ?string
  108.     {
  109.         return $this->generalDirectorPhone;
  110.     }
  111.     public function setGeneralDirectorPhone(string $generalDirectorPhone): self
  112.     {
  113.         $this->generalDirectorPhone $generalDirectorPhone;
  114.         return $this;
  115.     }
  116.     public function isEnabled(): ?bool
  117.     {
  118.         return $this->enabled;
  119.     }
  120.     public function setEnabled(bool $enabled): self
  121.     {
  122.         $this->enabled $enabled;
  123.         return $this;
  124.     }
  125.     public function isIsMoral(): ?bool
  126.     {
  127.         return $this->isMoral;
  128.     }
  129.     public function setIsMoral(bool $isMoral): self
  130.     {
  131.         $this->isMoral $isMoral;
  132.         return $this;
  133.     }
  134.     public function getCustomsAgentPatentNumber(): ?string
  135.     {
  136.         return $this->customsAgentPatentNumber;
  137.     }
  138.     public function setCustomsAgentPatentNumber(string $customsAgentPatentNumber): self
  139.     {
  140.         $this->customsAgentPatentNumber $customsAgentPatentNumber;
  141.         return $this;
  142.     }
  143.     public function getRfc(): ?string
  144.     {
  145.         return $this->rfc;
  146.     }
  147.     public function setRfc(string $rfc): self
  148.     {
  149.         $this->rfc $rfc;
  150.         return $this;
  151.     }
  152.     public function getGeneralDirectorEmail(): ?string
  153.     {
  154.         return $this->generalDirectorEmail;
  155.     }
  156.     public function setGeneralDirectorEmail(string $generalDirectorEmail): self
  157.     {
  158.         $this->generalDirectorEmail $generalDirectorEmail;
  159.         return $this;
  160.     }
  161.     /**
  162.      * @return Collection<int, ContactPerson>
  163.      */
  164.     public function getContactPeople(): Collection
  165.     {
  166.         return $this->contactPeople;
  167.     }
  168.     public function addContactPerson(ContactPerson $contactPerson): self
  169.     {
  170.         if (!$this->contactPeople->contains($contactPerson)) {
  171.             $this->contactPeople[] = $contactPerson;
  172.             $contactPerson->setCustomsBroker($this);
  173.         }
  174.         return $this;
  175.     }
  176.     public function removeContactPerson(ContactPerson $contactPerson): self
  177.     {
  178.         if ($this->contactPeople->removeElement($contactPerson)) {
  179.             // set the owning side to null (unless already changed)
  180.             if ($contactPerson->getCustomsBroker() === $this) {
  181.                 $contactPerson->setCustomsBroker(null);
  182.             }
  183.         }
  184.         return $this;
  185.     }
  186. }