src/Entity/Olympiad/Online/DirectionLanguage.php line 10

  1. <?php
  2. namespace App\Entity\Olympiad\Online;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. #[ORM\Table(name'olymp_online_direction_langs')]
  6. #[ORM\Entity(repositoryClass'App\Repository\Olympiad\Online\DirectionLanguageRepository')]
  7. class DirectionLanguage
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue(strategy'AUTO')]
  11.     #[ORM\Column(type'integer')]
  12.     private ?int $id null;
  13.     #[ORM\ManyToOne(targetEntity'App\Entity\Olympiad\Online\Direction'inversedBy'languages')]
  14.     #[ORM\JoinColumn(nullablefalse)]
  15.     private Direction $direction;
  16.     #[ORM\ManyToOne(targetEntity'App\Entity\Olympiad\Online\Language'inversedBy'directions')]
  17.     #[ORM\JoinColumn(nullablefalsereferencedColumnName'locale'name'language_locale')]
  18.     private ?Language $language null;
  19.     #[ORM\Column(typeTypes::INTEGERnullabletrue)]
  20.     private ?int $courseId null;
  21.     #[ORM\Column(typeTypes::INTEGERnullabletrue)]
  22.     private ?int $elementId null;
  23.     /**
  24.      * @return int|null
  25.      */
  26.     public function getId(): ?int
  27.     {
  28.         return $this->id;
  29.     }
  30.     /**
  31.      * @param int|null $id
  32.      */
  33.     public function setId(?int $id): void
  34.     {
  35.         $this->id $id;
  36.     }
  37.     /**
  38.      * @return Direction
  39.      */
  40.     public function getDirection(): Direction
  41.     {
  42.         return $this->direction;
  43.     }
  44.     /**
  45.      * @param Direction $direction
  46.      */
  47.     public function setDirection(Direction $direction): void
  48.     {
  49.         $this->direction $direction;
  50.     }
  51.     /**
  52.      * @return Language|null
  53.      */
  54.     public function getLanguage(): ?Language
  55.     {
  56.         return $this->language;
  57.     }
  58.     /**
  59.      * @param Language|null $language
  60.      */
  61.     public function setLanguage(?Language $language): void
  62.     {
  63.         $this->language $language;
  64.     }
  65.     public function getCourseId(): ?int
  66.     {
  67.         return $this->courseId;
  68.     }
  69.     public function setCourseId(?int $courseId): void
  70.     {
  71.         $this->courseId $courseId;
  72.     }
  73.     public function getElementId(): ?int
  74.     {
  75.         return $this->elementId;
  76.     }
  77.     public function setElementId(?int $elementId): void
  78.     {
  79.         $this->elementId $elementId;
  80.     }
  81. }