src/Entity/Olympiad/Level.php line 18
<?php
namespace App\Entity\Olympiad;
use App\Entity\Common\File;
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 App\Entity\Traits\WeightTrait;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table(name: 'olympiad_level')]
#[ORM\Entity(repositoryClass: 'App\Repository\Olympiad\LevelRepository')]
#[ORM\HasLifecycleCallbacks]
class Level implements UserCreatedInterface
{
use ActiveTrait;
use CreatedTrait;
use UserCreatedTrait;
use DeletedTrait;
use WeightTrait;
/**
* @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 string|null
*/
#[ORM\Column(type: 'string', length: 150)]
private $slug;
/** @var Collection|Olympiad[]
*/
#[ORM\OneToMany(targetEntity: 'App\Entity\Olympiad\Olympiad', mappedBy: 'level')]
private $olympiads;
/**
* @var File|null
*/
#[ORM\ManyToOne(targetEntity: 'App\Entity\Common\File', cascade: ['remove', 'persist'])]
private $logo;
/**
* @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 string|null
*/
public function getSlug(): ?string
{
return $this->slug;
}
/**
* @param string|null $slug
*/
public function setSlug(?string $slug): void
{
$this->slug = $slug;
}
/**
* @return Olympiad[]|Collection
*/
public function getOlympiads()
{
return $this->olympiads;
}
/**
* @param Olympiad[]|Collection $olympiads
*/
public function setOlympiads($olympiads): void
{
$this->olympiads = $olympiads;
}
/**
* @return File|null
*/
public function getLogo(): ?File
{
return $this->logo;
}
/**
* @param File|null $logo
*/
public function setLogo(?File $logo): void
{
$this->logo = $logo;
}
}