src/Entity/Platforma/Szkolenia.php line 13

  1. <?php
  2. namespace App\Entity\Platforma;
  3. use App\Repository\Platforma\SzkoleniaRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassSzkoleniaRepository::class)]
  9. #[ORM\Table(name"plat_szkolenia")]
  10. class Szkolenia
  11. {
  12.     #[ORM\Id]
  13.     #[ORM\GeneratedValue]
  14.     #[ORM\Column]
  15.     private ?int $id_szkolenia null;
  16.     #[ORM\Column(length255)]
  17.     private ?string $nazwa_szkolenia null;
  18.     #[ORM\Column]
  19.     private ?int $status_szkolenia null;
  20.     #[ORM\Column(typeTypes::TEXT)]
  21.     private ?string $tresc null;
  22.     #[ORM\Column(typeTypes::TEXT)]
  23.     private ?string $opis_szkolenia null;
  24.     #[ORM\Column]
  25.     private ?int $cena null;
  26.     #[ORM\Column]
  27.     private ?bool $test null;
  28.     #[ORM\Column(nullabletrue)]
  29.     private ?int $ilosc_potrzebnych_odpowiedzi null;
  30.     #[ORM\Column(name'KrotkaNazwa',length255)]
  31.     private ?string $KrotkaNazwa null;
  32.     #[ORM\Column(name'Zakres'length255)]
  33.     private ?string $Zakres null;
  34.     #[ORM\Column(length255nullabletrue)]
  35.     private ?string $blocked null;
  36.     #[ORM\Column]
  37.     private ?bool $visible null;
  38.     #[ORM\Column(name'order')]
  39.     private ?int $szkoleniaOrder null;
  40.     #[ORM\Column(nullabletrue)]
  41.     private ?int $order_dodane null;
  42.     #[ORM\Column]
  43.     private ?bool $certyfikat null;
  44.     #[ORM\Column]
  45.     private ?bool $certyfikat_papierowy null;
  46.     #[ORM\OneToMany(mappedBy'idSzkolenia'targetEntityPytania::class, orphanRemovalfalsefetch'EXTRA_LAZY')]
  47.     #[ORM\OrderBy(['idPytania' => 'ASC'])] // opcjonalnie: sortowanie po numerze pytania
  48.     private Collection $pytania;
  49.     public function __construct()
  50.     {
  51.         $this->pytania = new ArrayCollection();
  52.     }
  53.     public function getIdSzkolenia(): ?int
  54.     {
  55.         return $this->id_szkolenia;
  56.     }
  57.     public function getNazwaSzkolenia(): ?string
  58.     {
  59.         return $this->nazwa_szkolenia;
  60.     }
  61.     public function setNazwaSzkolenia(string $nazwa_szkolenia): static
  62.     {
  63.         $this->nazwa_szkolenia $nazwa_szkolenia;
  64.         return $this;
  65.     }
  66.     public function getStatusSzkolenia(): ?int
  67.     {
  68.         return $this->status_szkolenia;
  69.     }
  70.     public function setStatusSzkolenia(int $status_szkolenia): static
  71.     {
  72.         $this->status_szkolenia $status_szkolenia;
  73.         return $this;
  74.     }
  75.     public function getTresc(): ?string
  76.     {
  77.         return $this->tresc;
  78.     }
  79.     public function setTresc(string $tresc): static
  80.     {
  81.         $this->tresc $tresc;
  82.         return $this;
  83.     }
  84.     public function getOpisSzkolenia(): ?string
  85.     {
  86.         return $this->opis_szkolenia;
  87.     }
  88.     public function setOpisSzkolenia(string $opis_szkolenia): static
  89.     {
  90.         $this->opis_szkolenia $opis_szkolenia;
  91.         return $this;
  92.     }
  93.     public function getCena(): ?int
  94.     {
  95.         return $this->cena;
  96.     }
  97.     public function setCena(int $cena): static
  98.     {
  99.         $this->cena $cena;
  100.         return $this;
  101.     }
  102.     public function isTest(): ?bool
  103.     {
  104.         return $this->test;
  105.     }
  106.     public function setTest(bool $test): static
  107.     {
  108.         $this->test $test;
  109.         return $this;
  110.     }
  111.     public function getIloscPotrzebnychOdpowiedzi(): ?int
  112.     {
  113.         return $this->ilosc_potrzebnych_odpowiedzi;
  114.     }
  115.     public function setIloscPotrzebnychOdpowiedzi(?int $ilosc_potrzebnych_odpowiedzi): static
  116.     {
  117.         $this->ilosc_potrzebnych_odpowiedzi $ilosc_potrzebnych_odpowiedzi;
  118.         return $this;
  119.     }
  120.     public function getKrotkaNazwa(): ?string
  121.     {
  122.         return $this->KrotkaNazwa;
  123.     }
  124.     public function setKrotkaNazwa(string $KrotkaNazwa): static
  125.     {
  126.         $this->KrotkaNazwa $KrotkaNazwa;
  127.         return $this;
  128.     }
  129.     public function getZakres(): ?string
  130.     {
  131.         return $this->Zakres;
  132.     }
  133.     public function setZakres(string $Zakres): static
  134.     {
  135.         $this->Zakres $Zakres;
  136.         return $this;
  137.     }
  138.     public function getBlocked(): ?string
  139.     {
  140.         return $this->blocked;
  141.     }
  142.     public function setBlocked(?string $blocked): static
  143.     {
  144.         $this->blocked $blocked;
  145.         return $this;
  146.     }
  147.     public function isVisible(): ?bool
  148.     {
  149.         return $this->visible;
  150.     }
  151.     public function setVisible(bool $visible): static
  152.     {
  153.         $this->visible $visible;
  154.         return $this;
  155.     }
  156.     public function getSzkoleniaOrder(): ?int
  157.     {
  158.         return $this->szkoleniaOrder;
  159.     }
  160.     public function setSzkoleniaOrder(int $szkoleniaOrder): static
  161.     {
  162.         $this->szkoleniaOrder $szkoleniaOrder;
  163.         return $this;
  164.     }
  165.     public function getOrderDodane(): ?int
  166.     {
  167.         return $this->order_dodane;
  168.     }
  169.     public function setOrderDodane(?int $order_dodane): static
  170.     {
  171.         $this->order_dodane $order_dodane;
  172.         return $this;
  173.     }
  174.     public function isCertyfikat(): ?bool
  175.     {
  176.         return $this->certyfikat;
  177.     }
  178.     public function setCertyfikat(bool $certyfikat): static
  179.     {
  180.         $this->certyfikat $certyfikat;
  181.         return $this;
  182.     }
  183.     public function isCertyfikatPapierowy(): ?bool
  184.     {
  185.         return $this->certyfikat_papierowy;
  186.     }
  187.     public function setCertyfikatPapierowy(bool $certyfikat_papierowy): static
  188.     {
  189.         $this->certyfikat_papierowy $certyfikat_papierowy;
  190.         return $this;
  191.     }
  192.     /** @return Collection<int, Pytania> */
  193.     public function getPytania(): Collection
  194.     {
  195.         return $this->pytania;
  196.     }
  197.     // opcjonalnie — przydaje się przy modyfikacjach w kodzie:
  198.     public function addPytanie(Pytania $p): self
  199.     {
  200.         if (!$this->pytania->contains($p)) {
  201.             $this->pytania->add($p);
  202.             $p->setIdSzkolenia($this);
  203.         }
  204.         return $this;
  205.     }
  206.     public function removePytanie(Pytania $p): self
  207.     {
  208.         if ($this->pytania->removeElement($p)) {
  209.             if ($p->getIdSzkolenia() === $this) {
  210.                 $p->setIdSzkolenia($this); // lub $p->setIdSzkolenia(null) jeśli JoinColumn nullable
  211.             }
  212.         }
  213.         return $this;
  214.     }
  215. }