src/Entity/Olympiad/Stage.php line 19

  1. <?php
  2. namespace App\Entity\Olympiad;
  3. use App\Entity\Common\DateInterval;
  4. use App\Entity\Traits\ActiveTrait;
  5. use App\Entity\Traits\TrackerFields;
  6. use App\Entity\Traits\UserCreatedInterface;
  7. use App\Entity\Traits\UserUpdatedInterface;
  8. use App\Entity\UUID\HaveUuidInterface;
  9. use App\Entity\UUID\UuidTrait;
  10. use App\Model\Translation\TranslatableTrait;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  13. #[ORM\Table(name'olympiad_stage')]
  14. #[ORM\Entity(repositoryClass'App\Repository\Olympiad\StageRepository')]
  15. #[ORM\HasLifecycleCallbacks]
  16. class Stage implements UserCreatedInterfaceUserUpdatedInterfaceHaveUuidInterfaceTranslatableInterface
  17. {
  18.     use TranslatableTrait;
  19.     use TrackerFields;
  20.     use ActiveTrait;
  21.     use UuidTrait;
  22.     /**
  23.      * @var int|null
  24.      */
  25.     #[ORM\Id]
  26.     #[ORM\GeneratedValue(strategy'AUTO')]
  27.     #[ORM\Column(type'integer')]
  28.     private $id;
  29.     /**
  30.      * @var string|null
  31.      */
  32.     #[ORM\Column(type'string'nullabletrue)]
  33.     private $caption;
  34.     /**
  35.      * @var string|null
  36.      */
  37.     #[ORM\Column(type'text'nullabletrue)]
  38.     private $description;
  39.     /**
  40.      * @var string|null
  41.      */
  42.     #[ORM\Column(type'text'nullabletrue)]
  43.     private $place;
  44.     /**
  45.      * @var string|null
  46.      */
  47.     #[ORM\Column(type'string'nullabletrue)]
  48.     private ?string $place_short null;
  49.     /**
  50.      * @var string|null
  51.      */
  52.     #[ORM\Column(type'text'nullabletrue)]
  53.     private $contacts;
  54.     /**
  55.      * @var Olympiad|null
  56.      */
  57.     #[ORM\ManyToOne(targetEntity'App\Entity\Olympiad\Olympiad'inversedBy'stages')]
  58.     #[ORM\JoinColumn(nullablefalse)]
  59.     private $olympiad;
  60.     /**
  61.      * @var DateInterval
  62.      */
  63.     #[ORM\Embedded(class: 'App\Entity\Common\DateInterval')]
  64.     private $interval;
  65.     public function __construct()
  66.     {
  67.         $this->interval = new DateInterval();
  68.     }
  69.     /**
  70.      * @return int|null
  71.      */
  72.     public function getId(): ?int
  73.     {
  74.         return $this->id;
  75.     }
  76.     /**
  77.      * @param int|null $id
  78.      */
  79.     public function setId(?int $id): void
  80.     {
  81.         $this->id $id;
  82.     }
  83.     /**
  84.      * @return string|null
  85.      */
  86.     /*  public function getCaption(): ?string
  87.       {
  88.           return $this->caption;
  89.       }*/
  90.     /**
  91.      * @param string|null $caption
  92.      */
  93.     /*    public function setCaption(?string $caption): void
  94.         {
  95.             $this->caption = $caption;
  96.         } */
  97.     /**
  98.      * @return string|null
  99.      */
  100.     /**
  101.      * @return Olympiad|null
  102.      */
  103.     public function getOlympiad(): ?Olympiad
  104.     {
  105.         return $this->olympiad;
  106.     }
  107.     /**
  108.      * @param Olympiad|null $olympiad
  109.      */
  110.     public function setOlympiad(?Olympiad $olympiad): void
  111.     {
  112.         $this->olympiad $olympiad;
  113.     }
  114.     /**
  115.      * @return DateInterval
  116.      */
  117.     public function getInterval(): DateInterval
  118.     {
  119.         return $this->interval;
  120.     }
  121.     /**
  122.      * @param DateInterval $interval
  123.      */
  124.     public function setInterval(DateInterval $interval): void
  125.     {
  126.         $this->interval $interval;
  127.     }
  128. }