src/Entity/Olympiad/Grade.php line 15

  1. <?php
  2. namespace App\Entity\Olympiad;
  3. use App\Entity\Traits\ActiveTrait;
  4. use App\Entity\Traits\TrackerFields;
  5. use App\Entity\Traits\UserCreatedInterface;
  6. use App\Entity\Traits\UserUpdatedInterface;
  7. use Doctrine\Common\Collections\Collection;
  8. use Doctrine\ORM\Mapping as ORM;
  9. #[ORM\Table(name'olympiad_grade')]
  10. #[ORM\Entity(repositoryClass'App\Repository\Olympiad\GradeRepository')]
  11. #[ORM\HasLifecycleCallbacks]
  12. class Grade implements UserCreatedInterfaceUserUpdatedInterface
  13. {
  14.     use TrackerFields;
  15.     use ActiveTrait;
  16.     /**
  17.      * @var int|null
  18.      */
  19.     #[ORM\Id]
  20.     #[ORM\GeneratedValue(strategy'AUTO')]
  21.     #[ORM\Column(type'integer')]
  22.     private $id;
  23.     /**
  24.      * @var Collection|Olympiad[]
  25.      *
  26.      */
  27.     #[ORM\ManyToMany(targetEntity'App\Entity\Olympiad\Olympiad'mappedBy'grades')]
  28.     private $olympiads;
  29.     /**
  30.      * @var string|null
  31.      */
  32.     #[ORM\Column(type'string'nullablefalse)]
  33.     private $value;
  34.     /**
  35.      * @var string|null
  36.      */
  37.     #[ORM\Column(type'string'nullablefalse)]
  38.     private $caption;
  39.     /**
  40.      * @return int|null
  41.      */
  42.     public function getId(): ?int
  43.     {
  44.         return $this->id;
  45.     }
  46.     /**
  47.      * @param int|null $id
  48.      */
  49.     public function setId(?int $id): void
  50.     {
  51.         $this->id $id;
  52.     }
  53.     /**
  54.      * @return Olympiad[]|Collection
  55.      */
  56.     public function getOlympiads()
  57.     {
  58.         return $this->olympiads;
  59.     }
  60.     /**
  61.      * @param Olympiad[]|Collection $olympiads
  62.      */
  63.     public function setOlympiads($olympiads): void
  64.     {
  65.         $this->olympiads $olympiads;
  66.     }
  67.     /**
  68.      * @return string|null
  69.      */
  70.     public function getValue(): ?string
  71.     {
  72.         return $this->value;
  73.     }
  74.     /**
  75.      * @param string|null $value
  76.      */
  77.     public function setValue(?string $value): void
  78.     {
  79.         $this->value $value;
  80.     }
  81.     /**
  82.      * @return string|null
  83.      */
  84.     public function getCaption(): ?string
  85.     {
  86.         return $this->caption;
  87.     }
  88.     /**
  89.      * @param string|null $caption
  90.      */
  91.     public function setCaption(?string $caption): void
  92.     {
  93.         $this->caption $caption;
  94.     }
  95. }