src/Entity/Olympiad/Online/CourseOverride.php line 11
<?php
namespace App\Entity\Olympiad\Online;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'olymp_online_course_override')]
#[ORM\Entity(repositoryClass: 'App\Repository\Olympiad\Online\CourseOverrideRepository')]
class CourseOverride
{
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private ?int $id = null;
#[ORM\Column(type: 'string', nullable: false)]
private ?string $caption = null;
#[ORM\Column(type: 'integer', nullable: true)]
private ?int $courseId = null;
#[ORM\Column(type: 'integer', nullable: true,)]
private ?int $elementId = null;
#[ORM\OneToMany(targetEntity: \App\Entity\Olympiad\Online\Participant::class, mappedBy: 'courseOverride')]
private Collection $participants;
#[ORM\ManyToOne(targetEntity: \App\Entity\Olympiad\Online\Category::class, inversedBy: 'courseOverrides')]
#[ORM\JoinColumn(nullable: false)]
private Category $category;
public function __construct()
{
$this->participants = new ArrayCollection();
}
/**
* @return int|null
*/
public function getId(): ?int
{
return $this->id;
}
/**
* @param int|null $id
*/
public function setId(?int $id): void
{
$this->id = $id;
}
/**
* @return string|null
*/
public function getCaption(): ?string
{
return $this->caption;
}
/**
* @param string|null $caption
*/
public function setCaption(?string $caption): void
{
$this->caption = $caption;
}
/**
* @return int|null
*/
public function getCourseId(): ?int
{
return $this->courseId;
}
/**
* @param int|null $courseId
*/
public function setCourseId(?int $courseId): void
{
$this->courseId = $courseId;
}
/**
* @return Collection<Participant>
*/
public function getParticipants(): Collection
{
return $this->participants;
}
public function setParticipants(Collection $participants): void
{
$this->participants = $participants;
}
/**
* @return Category
*/
public function getCategory(): Category
{
return $this->category;
}
/**
* @param Category $category
*/
public function setCategory(Category $category): void
{
$this->category = $category;
}
/**
* @return ArrayCollection
*/
public function getCourseOverrides(): ArrayCollection
{
return $this->courseOverrides;
}
/**
* @param ArrayCollection $courseOverrides
*/
public function setCourseOverrides(ArrayCollection $courseOverrides): void
{
$this->courseOverrides = $courseOverrides;
}
public function getElementId(): ?int
{
return $this->elementId;
}
public function setElementId(?int $elementId): void
{
$this->elementId = $elementId;
}
}