src/Entity/Gos/Participants.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use App\Entity\Gos\Uniqskills\UserCertificate;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Table()
  9.  * @ORM\Entity(repositoryClass="App\Repository\ParticipantsRepository")
  10.  * @ORM\HasLifecycleCallbacks()
  11.  */
  12. class Participants
  13. {
  14.     /**
  15.      * @ORM\Id()
  16.      * @ORM\GeneratedValue()
  17.      * @ORM\Column(type="integer")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\Orders", inversedBy="participants")
  22.      */
  23.     private $orders;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\ProductVariant", inversedBy="participantsPrimary")
  26.      * @ORM\JoinColumn()
  27.      */
  28.     private $primaryProductVariant;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $firstName;
  33.     /**
  34.      * @ORM\Column(type="string", length=255, nullable=true)
  35.      */
  36.     private $lastName;
  37.     /**
  38.      * @ORM\Column(type="string", length=30, nullable=true)
  39.      */
  40.     private $phoneNumber;
  41.     /**
  42.      * @ORM\Column(type="string", length=255)
  43.      */
  44.     private $email;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $position;
  49.     /**
  50.      * @ORM\Column(type="datetime")
  51.      */
  52.     private $createdAt;
  53.     /**
  54.      * @ORM\Column(type="datetime", nullable=true)
  55.      */
  56.     private $updatedAt;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      */
  60.     private $address;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      */
  64.     private $postalCode;
  65.     /**
  66.      * @ORM\Column(type="string", length=255, nullable=true)
  67.      */
  68.     private $city;
  69.     /**
  70.      * @ORM\OneToMany(targetEntity=UserCertificate::class, mappedBy="participant")
  71.      */
  72.     private $userCertificate;
  73.     /**
  74.      * @ORM\Column(type="boolean", nullable=true)
  75.      */
  76.     private $productDuplicationMessageDisplayed;
  77.     /**
  78.      * Participants constructor.
  79.      */
  80.     public function __construct()
  81.     {
  82.         $this->createdAt = new \DateTime();
  83.         $this->userCertificate = new ArrayCollection();
  84.     }
  85.     /** @ORM\PrePersist() */
  86.     public function prePersist()
  87.     {
  88.         $this->createdAt = new \DateTime();
  89.     }
  90.     /** @ORM\PreUpdate() */
  91.     public function preUpdate()
  92.     {
  93.         $this->updatedAt = new \DateTime();
  94.     }
  95.     /**
  96.      * @return array
  97.      */
  98.     public function getObjectVars()
  99.     {
  100.         return get_object_vars($this);
  101.     }
  102.     /**
  103.      * @return mixed
  104.      */
  105.     public function getId()
  106.     {
  107.         return $this->id;
  108.     }
  109.     /**
  110.      * @param mixed $id
  111.      */
  112.     public function setId($id): void
  113.     {
  114.         $this->id $id;
  115.     }
  116.     /**
  117.      * @return mixed
  118.      */
  119.     public function getOrders()
  120.     {
  121.         return $this->orders;
  122.     }
  123.     /**
  124.      * @param mixed $orders
  125.      */
  126.     public function setOrders($orders): void
  127.     {
  128.         $this->orders $orders;
  129.     }
  130.     /**
  131.      * @return mixed
  132.      */
  133.     public function getPrimaryProductVariant()
  134.     {
  135.         return $this->primaryProductVariant;
  136.     }
  137.     /**
  138.      * @param mixed $primaryProductVariant
  139.      */
  140.     public function setPrimaryProductVariant($primaryProductVariant): void
  141.     {
  142.         $this->primaryProductVariant $primaryProductVariant;
  143.     }
  144.     /**
  145.      * @return mixed
  146.      */
  147.     public function getFirstName()
  148.     {
  149.         return $this->firstName;
  150.     }
  151.     /**
  152.      * @param mixed $firstName
  153.      */
  154.     public function setFirstName($firstName): void
  155.     {
  156.         $this->firstName $firstName;
  157.     }
  158.     /**
  159.      * @return mixed
  160.      */
  161.     public function getLastName()
  162.     {
  163.         return $this->lastName;
  164.     }
  165.     /**
  166.      * @param mixed $lastName
  167.      */
  168.     public function setLastName($lastName): void
  169.     {
  170.         $this->lastName $lastName;
  171.     }
  172.     /**
  173.      * @return mixed
  174.      */
  175.     public function getPhoneNumber()
  176.     {
  177.         return $this->phoneNumber;
  178.     }
  179.     /**
  180.      * @param mixed $phoneNumber
  181.      */
  182.     public function setPhoneNumber($phoneNumber): void
  183.     {
  184.         $this->phoneNumber $phoneNumber;
  185.     }
  186.     /**
  187.      * @return mixed
  188.      */
  189.     public function getEmail()
  190.     {
  191.         return $this->email;
  192.     }
  193.     /**
  194.      * @param mixed $email
  195.      */
  196.     public function setEmail($email): void
  197.     {
  198.         $this->email $email;
  199.     }
  200.     /**
  201.      * @return mixed
  202.      */
  203.     public function getPosition()
  204.     {
  205.         return $this->position;
  206.     }
  207.     /**
  208.      * @param mixed $position
  209.      */
  210.     public function setPosition($position): void
  211.     {
  212.         $this->position $position;
  213.     }
  214.     /**
  215.      * @return mixed
  216.      */
  217.     public function getCreatedAt()
  218.     {
  219.         return $this->createdAt;
  220.     }
  221.     /**
  222.      * @param mixed $createdAt
  223.      */
  224.     public function setCreatedAt($createdAt): void
  225.     {
  226.         $this->createdAt $createdAt;
  227.     }
  228.     /**
  229.      * @return mixed
  230.      */
  231.     public function getUpdatedAt()
  232.     {
  233.         return $this->updatedAt;
  234.     }
  235.     /**
  236.      * @param mixed $updatedAt
  237.      */
  238.     public function setUpdatedAt($updatedAt): void
  239.     {
  240.         $this->updatedAt $updatedAt;
  241.     }
  242.     public function getAddress(): ?string
  243.     {
  244.         return $this->address;
  245.     }
  246.     public function setAddress(?string $address): self
  247.     {
  248.         $this->address $address;
  249.         return $this;
  250.     }
  251.     public function getPostalCode(): ?string
  252.     {
  253.         return $this->postalCode;
  254.     }
  255.     public function setPostalCode(?string $postalCode): self
  256.     {
  257.         $this->postalCode $postalCode;
  258.         return $this;
  259.     }
  260.     public function getCity(): ?string
  261.     {
  262.         return $this->city;
  263.     }
  264.     public function setCity(?string $city): self
  265.     {
  266.         $this->city $city;
  267.         return $this;
  268.     }
  269.     /**
  270.      * @return Collection|UserCertificate[]
  271.      */
  272.     public function getUserCertificate(): Collection
  273.     {
  274.         return $this->userCertificate;
  275.     }
  276.     public function addUserCertificate(UserCertificate $userCertificate): self
  277.     {
  278.         if (!$this->userCertificate->contains($userCertificate)) {
  279.             $this->userCertificate[] = $userCertificate;
  280.             $userCertificate->setParticipant($this);
  281.         }
  282.         return $this;
  283.     }
  284.     public function removeUserCertificate(UserCertificate $userCertificate): self
  285.     {
  286.         if ($this->userCertificate->contains($userCertificate)) {
  287.             $this->userCertificate->removeElement($userCertificate);
  288.             // set the owning side to null (unless already changed)
  289.             if ($userCertificate->getParticipant() === $this) {
  290.                 $userCertificate->setParticipant(null);
  291.             }
  292.         }
  293.         return $this;
  294.     }
  295.     public function getProductDuplicationMessageDisplayed(): ?bool
  296.     {
  297.         return $this->productDuplicationMessageDisplayed;
  298.     }
  299.     public function setProductDuplicationMessageDisplayed(?bool $productDuplicationMessageDisplayed): self
  300.     {
  301.         $this->productDuplicationMessageDisplayed $productDuplicationMessageDisplayed;
  302.         return $this;
  303.     }
  304. }