src/Entity/Contact.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ContactRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=ContactRepository::class)
  9.  */
  10. class Contact
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="integer")
  20.      */
  21.     private $axonautId;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $firstname;
  26.     /**
  27.      * @ORM\Column(type="string", length=255, nullable=true)
  28.      */
  29.     private $lastname;
  30.     /**
  31.      * @ORM\Column(type="string", length=255, nullable=true)
  32.      */
  33.     private $email;
  34.     /**
  35.      * @ORM\Column(type="string", length=32, nullable=true)
  36.      */
  37.     private $phoneNumber;
  38.     /**
  39.      * @ORM\Column(type="string", length=32, nullable=true)
  40.      */
  41.     private $cellphoneNumber;
  42.     /**
  43.      * @ORM\Column(type="string", length=255, nullable=true)
  44.      */
  45.     private $job;
  46.     /**
  47.      * @ORM\ManyToOne(targetEntity=Firm::class, inversedBy="contacts")
  48.      * @ORM\JoinColumn(nullable=false)
  49.      */
  50.     private $firm;
  51.     /**
  52.      * @ORM\Column(type="integer", nullable=true)
  53.      */
  54.     private $filegetterId;
  55.     /**
  56.      * @ORM\OneToMany(targetEntity=Job::class, mappedBy="contact")
  57.      */
  58.     private $jobs;
  59.     /**
  60.      * @ORM\Column(type="json", nullable=true)
  61.      */
  62.     private $credits = [];
  63.     /**
  64.      * @ORM\Column(type="boolean")
  65.      */
  66.     private $sendCodeBySms false;
  67.     /**
  68.      * @ORM\Column(type="json", nullable=true)
  69.      */
  70.     private $axonautCustomFields = [];
  71.     /**
  72.      * @ORM\Column(type="integer", nullable=true)
  73.      */
  74.     private $axonautFirmId;
  75.     public function __construct()
  76.     {
  77.         $this->jobs = new ArrayCollection();
  78.     }
  79.     public function getId(): ?int
  80.     {
  81.         return $this->id;
  82.     }
  83.     public function getAxonautId(): ?int
  84.     {
  85.         return $this->axonautId;
  86.     }
  87.     public function setAxonautId(int $axonautId): self
  88.     {
  89.         $this->axonautId $axonautId;
  90.         return $this;
  91.     }
  92.     public function getFirstname(): ?string
  93.     {
  94.         return $this->firstname;
  95.     }
  96.     public function setFirstname(?string $firstname null): self
  97.     {
  98.         $this->firstname $firstname;
  99.         return $this;
  100.     }
  101.     public function getLastname(): ?string
  102.     {
  103.         return $this->lastname;
  104.     }
  105.     public function setLastname(?string $lastname null): self
  106.     {
  107.         $this->lastname $lastname;
  108.         return $this;
  109.     }
  110.     public function getEmail(): ?string
  111.     {
  112.         return $this->email;
  113.     }
  114.     public function setEmail(?string $email): self
  115.     {
  116.         $this->email $email;
  117.         return $this;
  118.     }
  119.     public function getPhoneNumber(): ?string
  120.     {
  121.         return $this->phoneNumber;
  122.     }
  123.     public function setPhoneNumber(?string $phoneNumber null): self
  124.     {
  125.         $this->phoneNumber $phoneNumber;
  126.         return $this;
  127.     }
  128.     public function getCellphoneNumber(): ?string
  129.     {
  130.         return $this->cellphoneNumber;
  131.     }
  132.     public function setCellphoneNumber(?string $cellphoneNumber null): self
  133.     {
  134.         $this->cellphoneNumber $cellphoneNumber;
  135.         return $this;
  136.     }
  137.     public function getJob(): ?string
  138.     {
  139.         return $this->job;
  140.     }
  141.     public function setJob(?string $job): self
  142.     {
  143.         $this->job $job;
  144.         return $this;
  145.     }
  146.     public function getFirm(): ?Firm
  147.     {
  148.         return $this->firm;
  149.     }
  150.     public function setFirm(?Firm $firm): self
  151.     {
  152.         $this->firm $firm;
  153.         return $this;
  154.     }
  155.     public function getFilegetterId(): ?int
  156.     {
  157.         return $this->filegetterId;
  158.     }
  159.     public function setFilegetterId(?int $filegetterId): self
  160.     {
  161.         $this->filegetterId $filegetterId;
  162.         return $this;
  163.     }
  164.     /**
  165.      * @return Collection|Job[]
  166.      */
  167.     public function getJobs(): Collection
  168.     {
  169.         return $this->jobs;
  170.     }
  171.     public function addJob(Job $job): self
  172.     {
  173.         if (!$this->jobs->contains($job)) {
  174.             $this->jobs[] = $job;
  175.             $job->setContact($this);
  176.         }
  177.         return $this;
  178.     }
  179.     public function removeJob(Job $job): self
  180.     {
  181.         if ($this->jobs->removeElement($job)) {
  182.             // set the owning side to null (unless already changed)
  183.             if ($job->getContact() === $this) {
  184.                 $job->setContact(null);
  185.             }
  186.         }
  187.         return $this;
  188.     }
  189.     public function getCredits(): ?array
  190.     {
  191.         return $this->credits;
  192.     }
  193.     public function setCredits(?array $credits): self
  194.     {
  195.         $this->credits $credits;
  196.         return $this;
  197.     }
  198.     public function getSendCodeBySms(): ?bool
  199.     {
  200.         return $this->sendCodeBySms;
  201.     }
  202.     public function setSendCodeBySms(bool $sendCodeBySms): self
  203.     {
  204.         $this->sendCodeBySms $sendCodeBySms;
  205.         return $this;
  206.     }
  207.     public function getAxonautCustomFields(): ?array
  208.     {
  209.         return $this->axonautCustomFields;
  210.     }
  211.     public function setAxonautCustomFields(?array $axonautCustomFields): self
  212.     {
  213.         $this->axonautCustomFields $axonautCustomFields;
  214.         return $this;
  215.     }
  216.     public function getAxonautFirmId(): ?int
  217.     {
  218.         return $this->axonautFirmId;
  219.     }
  220.     public function setAxonautFirmId(?int $axonautFirmId): self
  221.     {
  222.         $this->axonautFirmId $axonautFirmId;
  223.         return $this;
  224.     }
  225. }