src/Entity/Platforma/Szkolenia.php line 13
<?phpnamespace App\Entity\Platforma;use App\Repository\Platforma\SzkoleniaRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;#[ORM\Entity(repositoryClass: SzkoleniaRepository::class)]#[ORM\Table(name: "plat_szkolenia")]class Szkolenia{#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id_szkolenia = null;#[ORM\Column(length: 255)]private ?string $nazwa_szkolenia = null;#[ORM\Column]private ?int $status_szkolenia = null;#[ORM\Column(type: Types::TEXT)]private ?string $tresc = null;#[ORM\Column(type: Types::TEXT)]private ?string $opis_szkolenia = null;#[ORM\Column]private ?int $cena = null;#[ORM\Column]private ?bool $test = null;#[ORM\Column(nullable: true)]private ?int $ilosc_potrzebnych_odpowiedzi = null;#[ORM\Column(name: 'KrotkaNazwa',length: 255)]private ?string $KrotkaNazwa = null;#[ORM\Column(name: 'Zakres', length: 255)]private ?string $Zakres = null;#[ORM\Column(length: 255, nullable: true)]private ?string $blocked = null;#[ORM\Column]private ?bool $visible = null;#[ORM\Column(name: 'order')]private ?int $szkoleniaOrder = null;#[ORM\Column(nullable: true)]private ?int $order_dodane = null;#[ORM\Column]private ?bool $certyfikat = null;#[ORM\Column]private ?bool $certyfikat_papierowy = null;#[ORM\OneToMany(mappedBy: 'idSzkolenia', targetEntity: Pytania::class, orphanRemoval: false, fetch: 'EXTRA_LAZY')]#[ORM\OrderBy(['idPytania' => 'ASC'])] // opcjonalnie: sortowanie po numerze pytaniaprivate Collection $pytania;public function __construct(){$this->pytania = new ArrayCollection();}public function getIdSzkolenia(): ?int{return $this->id_szkolenia;}public function getNazwaSzkolenia(): ?string{return $this->nazwa_szkolenia;}public function setNazwaSzkolenia(string $nazwa_szkolenia): static{$this->nazwa_szkolenia = $nazwa_szkolenia;return $this;}public function getStatusSzkolenia(): ?int{return $this->status_szkolenia;}public function setStatusSzkolenia(int $status_szkolenia): static{$this->status_szkolenia = $status_szkolenia;return $this;}public function getTresc(): ?string{return $this->tresc;}public function setTresc(string $tresc): static{$this->tresc = $tresc;return $this;}public function getOpisSzkolenia(): ?string{return $this->opis_szkolenia;}public function setOpisSzkolenia(string $opis_szkolenia): static{$this->opis_szkolenia = $opis_szkolenia;return $this;}public function getCena(): ?int{return $this->cena;}public function setCena(int $cena): static{$this->cena = $cena;return $this;}public function isTest(): ?bool{return $this->test;}public function setTest(bool $test): static{$this->test = $test;return $this;}public function getIloscPotrzebnychOdpowiedzi(): ?int{return $this->ilosc_potrzebnych_odpowiedzi;}public function setIloscPotrzebnychOdpowiedzi(?int $ilosc_potrzebnych_odpowiedzi): static{$this->ilosc_potrzebnych_odpowiedzi = $ilosc_potrzebnych_odpowiedzi;return $this;}public function getKrotkaNazwa(): ?string{return $this->KrotkaNazwa;}public function setKrotkaNazwa(string $KrotkaNazwa): static{$this->KrotkaNazwa = $KrotkaNazwa;return $this;}public function getZakres(): ?string{return $this->Zakres;}public function setZakres(string $Zakres): static{$this->Zakres = $Zakres;return $this;}public function getBlocked(): ?string{return $this->blocked;}public function setBlocked(?string $blocked): static{$this->blocked = $blocked;return $this;}public function isVisible(): ?bool{return $this->visible;}public function setVisible(bool $visible): static{$this->visible = $visible;return $this;}public function getSzkoleniaOrder(): ?int{return $this->szkoleniaOrder;}public function setSzkoleniaOrder(int $szkoleniaOrder): static{$this->szkoleniaOrder = $szkoleniaOrder;return $this;}public function getOrderDodane(): ?int{return $this->order_dodane;}public function setOrderDodane(?int $order_dodane): static{$this->order_dodane = $order_dodane;return $this;}public function isCertyfikat(): ?bool{return $this->certyfikat;}public function setCertyfikat(bool $certyfikat): static{$this->certyfikat = $certyfikat;return $this;}public function isCertyfikatPapierowy(): ?bool{return $this->certyfikat_papierowy;}public function setCertyfikatPapierowy(bool $certyfikat_papierowy): static{$this->certyfikat_papierowy = $certyfikat_papierowy;return $this;}/** @return Collection<int, Pytania> */public function getPytania(): Collection{return $this->pytania;}// opcjonalnie — przydaje się przy modyfikacjach w kodzie:public function addPytanie(Pytania $p): self{if (!$this->pytania->contains($p)) {$this->pytania->add($p);$p->setIdSzkolenia($this);}return $this;}public function removePytanie(Pytania $p): self{if ($this->pytania->removeElement($p)) {if ($p->getIdSzkolenia() === $this) {$p->setIdSzkolenia($this); // lub $p->setIdSzkolenia(null) jeśli JoinColumn nullable}}return $this;}}