src/Entity/Olympiad/Online/CourseOverride.php line 11

  1. <?php
  2. namespace App\Entity\Olympiad\Online;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. #[ORM\Table(name'olymp_online_course_override')]
  7. #[ORM\Entity(repositoryClass'App\Repository\Olympiad\Online\CourseOverrideRepository')]
  8. class CourseOverride
  9. {
  10.     #[ORM\Id]
  11.     #[ORM\GeneratedValue(strategy'AUTO')]
  12.     #[ORM\Column(type'integer')]
  13.     private ?int $id null;
  14.     #[ORM\Column(type'string'nullablefalse)]
  15.     private ?string $caption null;
  16.     #[ORM\Column(type'integer'nullabletrue)]
  17.     private ?int $courseId null;
  18.     #[ORM\Column(type'integer'nullabletrue,)]
  19.     private ?int $elementId null;
  20.     #[ORM\OneToMany(targetEntity\App\Entity\Olympiad\Online\Participant::class, mappedBy'courseOverride')]
  21.     private Collection $participants;
  22.     #[ORM\ManyToOne(targetEntity\App\Entity\Olympiad\Online\Category::class, inversedBy'courseOverrides')]
  23.     #[ORM\JoinColumn(nullablefalse)]
  24.     private Category $category;
  25.     public function __construct()
  26.     {
  27.         $this->participants = new ArrayCollection();
  28.     }
  29.     /**
  30.      * @return int|null
  31.      */
  32.     public function getId(): ?int
  33.     {
  34.         return $this->id;
  35.     }
  36.     /**
  37.      * @param int|null $id
  38.      */
  39.     public function setId(?int $id): void
  40.     {
  41.         $this->id $id;
  42.     }
  43.     /**
  44.      * @return string|null
  45.      */
  46.     public function getCaption(): ?string
  47.     {
  48.         return $this->caption;
  49.     }
  50.     /**
  51.      * @param string|null $caption
  52.      */
  53.     public function setCaption(?string $caption): void
  54.     {
  55.         $this->caption $caption;
  56.     }
  57.     /**
  58.      * @return int|null
  59.      */
  60.     public function getCourseId(): ?int
  61.     {
  62.         return $this->courseId;
  63.     }
  64.     /**
  65.      * @param int|null $courseId
  66.      */
  67.     public function setCourseId(?int $courseId): void
  68.     {
  69.         $this->courseId $courseId;
  70.     }
  71.     /**
  72.      * @return Collection<Participant>
  73.      */
  74.     public function getParticipants(): Collection
  75.     {
  76.         return $this->participants;
  77.     }
  78.     public function setParticipants(Collection $participants): void
  79.     {
  80.         $this->participants $participants;
  81.     }
  82.     /**
  83.      * @return Category
  84.      */
  85.     public function getCategory(): Category
  86.     {
  87.         return $this->category;
  88.     }
  89.     /**
  90.      * @param Category $category
  91.      */
  92.     public function setCategory(Category $category): void
  93.     {
  94.         $this->category $category;
  95.     }
  96.     /**
  97.      * @return ArrayCollection
  98.      */
  99.     public function getCourseOverrides(): ArrayCollection
  100.     {
  101.         return $this->courseOverrides;
  102.     }
  103.     /**
  104.      * @param ArrayCollection $courseOverrides
  105.      */
  106.     public function setCourseOverrides(ArrayCollection $courseOverrides): void
  107.     {
  108.         $this->courseOverrides $courseOverrides;
  109.     }
  110.     public function getElementId(): ?int
  111.     {
  112.         return $this->elementId;
  113.     }
  114.     public function setElementId(?int $elementId): void
  115.     {
  116.         $this->elementId $elementId;
  117.     }
  118. }