src/Entity/Olympiad/Discipline.php line 17
<?php
namespace App\Entity\Olympiad;
use App\Entity\Scholar\Profile;
use App\Entity\Traits\ActiveTrait;
use App\Entity\Traits\CreatedTrait;
use App\Entity\Traits\DeletedTrait;
use App\Entity\Traits\UserCreatedInterface;
use App\Entity\Traits\UserCreatedTrait;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'olympiad_discipline')]
#[ORM\Entity(repositoryClass: 'App\Repository\Olympiad\DisciplineRepository')]
#[ORM\HasLifecycleCallbacks]
class Discipline implements UserCreatedInterface
{
use ActiveTrait;
use CreatedTrait;
use UserCreatedTrait;
use DeletedTrait;
/**
*
* @var int|null
*/
#[ORM\Id]
#[ORM\GeneratedValue(strategy: 'AUTO')]
#[ORM\Column(type: 'integer')]
private $id;
/**
* @var string|null
*/
#[ORM\Column(type: 'string')]
private $caption;
/**
* @var Category|null
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Olympiad\Category', inversedBy: 'disciplines')]
#[ORM\JoinColumn(nullable: false)]
private $category;
/**
* @var Collection|Olympiad[]
*
*
*/
#[ORM\ManyToMany(targetEntity: 'App\Entity\Olympiad\Olympiad', mappedBy: 'disciplines')]
private $olympiads;
/**
* @var Collection|Profile[]
*
*
*/
#[ORM\ManyToMany(targetEntity: 'App\Entity\Scholar\Profile', mappedBy: 'disciplines')]
private $scholar_profile;
/**
* @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 Category|null
*/
public function getCategory(): ?Category
{
return $this->category;
}
/**
* @param Category|null $category
*/
public function setCategory(?Category $category): void
{
$this->category = $category;
}
/**
* @return Olympiad[]|Collection
*/
public function getOlympiads()
{
return $this->olympiads;
}
/**
* @param Olympiad[]|Collection $olympiads
*/
public function setOlympiads($olympiads): void
{
$this->olympiads = $olympiads;
}
}