src/Entity/AffiliatedEventApplication.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AffiliatedEventApplicationRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Mapping\Annotation as Gedmo;
  6. /**
  7.  * @ORM\Entity(repositoryClass=AffiliatedEventApplicationRepository::class)
  8.  */
  9. class AffiliatedEventApplication
  10. {
  11.     const STATUS_PENDING 'pending'// the event is open to acquire a specialist
  12.     const STATUS_ACCEPTED 'accepted'// the event has a specialist
  13.     const STATUS_REFUSED 'refused'// the event is canceled
  14.     
  15.     const STATUSES = [
  16.         self::STATUS_PENDING,
  17.         self::STATUS_ACCEPTED,
  18.         self::STATUS_REFUSED,
  19.     ];
  20.     /**
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=Event::class, inversedBy="affiliatedEventApplications")
  28.      * @ORM\JoinColumn(nullable=false)
  29.      */
  30.     private $event;
  31.     /**
  32.      * @ORM\ManyToOne(targetEntity=Specialist::class, inversedBy="affiliatedEventApplications")
  33.      * @ORM\JoinColumn(nullable=false)
  34.      */
  35.     private $specialist;
  36.     /**
  37.      * @ORM\Column(type="string", length=255, nullable=true)
  38.      */
  39.     private $status;
  40.     /**
  41.      * @ORM\Column(type="text", nullable=true)
  42.      */
  43.     private $reasonToCompany;
  44.     /**
  45.      * @ORM\Column(type="datetime")
  46.      * @Gedmo\Timestampable(on="create")
  47.      */
  48.     private $createdAt;
  49.     /**
  50.      * @ORM\Column(type="datetime")
  51.      * @Gedmo\Timestampable(on="update")
  52.      */
  53.     private $updatedAt;
  54.     /**
  55.      * @ORM\ManyToOne(targetEntity=Company::class, inversedBy="affiliatedEventApplications")
  56.      */
  57.     private $company;
  58.     public function getId(): ?int
  59.     {
  60.         return $this->id;
  61.     }
  62.     public function getEvent(): ?Event
  63.     {
  64.         return $this->event;
  65.     }
  66.     public function setEvent(?Event $event): self
  67.     {
  68.         $this->event $event;
  69.         return $this;
  70.     }
  71.     public function getSpecialist(): ?Specialist
  72.     {
  73.         return $this->specialist;
  74.     }
  75.     public function setSpecialist(?Specialist $specialist): self
  76.     {
  77.         $this->specialist $specialist;
  78.         return $this;
  79.     }
  80.     public function getStatus(): ?string
  81.     {
  82.         return $this->status;
  83.     }
  84.     public function setStatus(?string $status): self
  85.     {
  86.         $this->status $status;
  87.         return $this;
  88.     }
  89.     public function getReasonToCompany(): ?string
  90.     {
  91.         return $this->reasonToCompany;
  92.     }
  93.     public function setReasonToCompany(?string $reasonToCompany): self
  94.     {
  95.         $this->reasonToCompany $reasonToCompany;
  96.         return $this;
  97.     }
  98.     public function getCreatedAt(): ?\DateTimeImmutable
  99.     {
  100.         return $this->createdAt;
  101.     }
  102.     public function setCreatedAt(\DateTimeImmutable $createdAt): self
  103.     {
  104.         $this->createdAt $createdAt;
  105.         return $this;
  106.     }
  107.     public function getUpdatedAt(): ?\DateTimeImmutable
  108.     {
  109.         return $this->updatedAt;
  110.     }
  111.     public function setUpdatedAt(\DateTimeImmutable $updatedAt): self
  112.     {
  113.         $this->updatedAt $updatedAt;
  114.         return $this;
  115.     }
  116.     public function getCompany(): ?Company
  117.     {
  118.         return $this->company;
  119.     }
  120.     public function setCompany(?Company $company): self
  121.     {
  122.         $this->company $company;
  123.         return $this;
  124.     }
  125. }