<?php

namespace App\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;

/**
 * @ORM\Entity(repositoryClass="App\Repository\ZakRepository")
 */
class Zak
{
    /**
     * @ORM\Id()
     * @ORM\GeneratedValue()
     * @ORM\Column(type="integer")
     */
    private $id;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $jmeno;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $prijmeni;

    /**
     * @ORM\Column(type="date")
     */
    private $datNar;

    /**
     * @ORM\Column(type="string", length=100, nullable=true)
     */
    private $image;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $stat;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $okres;

    /**
     * @ORM\Column(type="string", length=255)
     */
    private $ulice;

    /**
     * @ORM\Column(type="string", length=25)
     */
    private $cisPop;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Trida", inversedBy="zak")
     * @ORM\JoinColumn(nullable=false)
     */
    private $trida;

    /**
     * @ORM\ManyToOne(targetEntity="App\Entity\Skola", inversedBy="zak")
     */
    private $skola;

    /**
     * @ORM\OneToMany(targetEntity="App\Entity\Znamka", mappedBy="zak", orphanRemoval=true)
     */
    private $znamka;

    /**
     * @ORM\Column(type="smallint")
     */
    private $psc;

    /**
     * @ORM\Column(type="text", nullable=true)
     */
    private $poznamka;

    /**
     * @ORM\Column(type="string", length=15, nullable=true)
     */
    private $tel;

    /**
     * @ORM\OneToOne(targetEntity="App\Entity\User", mappedBy="zak", cascade={"persist", "remove"})
     */
    private $user;

    /**
     * @ORM\ManyToMany(targetEntity="App\Entity\Historie", mappedBy="zak")
     */
    private $historie;

    /**
     * @ORM\Column(type="string", length=10)
     */
    private $Rod_cis;

    /**
     * @ORM\Column(type="boolean")
     */
    private $pohlavi;

    /**
     * @ORM\Column(type="string", length=4)
     */
    private $obcanstvi;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $OP;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $pas;

    /**
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $email;

    /**
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $m_cast;

    /**
     * @ORM\Column(type="string", length=4, nullable=true)
     */
    private $pred_skol;

    /**
     * @ORM\Column(type="date")
     */
    private $dat_zah;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $dat_uk;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $zd_poj;

    /**
     * @ORM\Column(type="integer")
     */
    private $ind_stud_plan;

    /**
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $znevyhodneni;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $nadani;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $upr_vzd_program;

    /**
     * @ORM\Column(type="string", length=1, nullable=true)
     */
    private $odl_kult_prostredi;

    /**
     * @ORM\Column(type="string", length=255, nullable=true)
     */
    private $prodl_delka_vzd;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    private $uprava_vyst_vzdel;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $Dat_vyd_Doporuc;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $dat_konce_doporuc;

    /**
     * @ORM\Column(type="string", length=20, nullable=true)
     */
    private $norm_fin_narocnost;

    /**
     * @ORM\Column(type="string", length=1, nullable=true)
     */
    private $forma_poriz_pomucky;

    /**
     * @ORM\Column(type="boolean", nullable=true)
     */
    private $fin_narocnost;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $dat_zah_PO;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $dat_uk_PO;

    /**
     * @ORM\OneToMany(targetEntity="App\Entity\Absence", mappedBy="zak")
     */
    private $absence;

    /**
     * @ORM\ManyToMany(targetEntity="App\Entity\Rodic", mappedBy="zak")
     */
    private $rodic;

    /**
     * @ORM\Column(type="integer")
     */
    private $kv_st_obc;

    /**
     * @ORM\Column(type="string", length=2)
     */
    private $zah_doc;

    /**
     * @ORM\Column(type="string", length=2, nullable=true)
     */
    private $kod_uk;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $prizn;

    /**
     * @ORM\Column(type="integer")
     */
    private $zpusob;

    /**
     * @ORM\Column(type="integer")
     */
    private $fin;

    /**
     * @ORM\Column(type="date", nullable=true)
     */
    private $dat_zmen;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $kod_zmen;

    /**
     * @ORM\Column(type="string", length=10, nullable=true)
     */
    private $kat_znev;

    /**
     * @ORM\Column(type="integer", nullable=true)
     */
    private $pspo;







    public function __construct()
    {
        $this->znamka = new ArrayCollection();
        $this->historie = new ArrayCollection();
        $this->absence = new ArrayCollection();
        $this->rodic = new ArrayCollection();
    }

    public function __toString()
    {
        return $this -> jmeno . ' ' . $this -> prijmeni;
    }

    public function getId(): ?int
    {
        return $this->id;
    }

    public function getJmeno(): ?string
    {
        return $this->jmeno;
    }

    public function setJmeno(string $jmeno): self
    {
        $this->jmeno = $jmeno;

        return $this;
    }

    public function getPrijmeni(): ?string
    {
        return $this->prijmeni;
    }

    public function setPrijmeni(string $prijmeni): self
    {
        $this->prijmeni = $prijmeni;

        return $this;
    }

    public function getDatNar(): ?\DateTimeInterface
    {
        return $this->datNar;
    }

    public function setDatNar(\DateTimeInterface $datNar): self
    {
        $this->datNar = $datNar;

        return $this;
    }

    public function getImage(): ?string
    {
        return $this->image;
    }

    public function setImage(?string $image): self
    {
        $this->image = $image;

        return $this;
    }

    public function getStat(): ?string
    {
        return $this->stat;
    }

    public function setStat(?string $stat): self
    {
        $this->stat = $stat;

        return $this;
    }

    public function getOkres(): ?string
    {
        return $this->okres;
    }

    public function setOkres(?string $okres): self
    {
        $this->okres = $okres;

        return $this;
    }

    public function getUlice(): ?string
    {
        return $this->ulice;
    }

    public function setUlice(?string $ulice): self
    {
        $this->ulice = $ulice;

        return $this;
    }

    public function getCisPop(): ?string
    {
        return $this->cisPop;
    }

    public function setCisPop(?string $cisPop): self
    {
        $this->cisPop = $cisPop;

        return $this;
    }

    public function getTrida(): ?Trida
    {
        return $this->trida;
    }

    public function setTrida(?Trida $trida): self
    {
        $this->trida = $trida;

        return $this;
    }

    public function getSkola(): ?Skola
    {
        return $this->skola;
    }

    public function setSkola(?Skola $skola): self
    {
        $this->skola = $skola;

        return $this;
    }

    /**
     * @return Collection|Znamka[]
     */
    public function getZnamka(): Collection
    {
        return $this->znamka;
    }

    public function addZnamka(Znamka $znamka): self
    {
        if (!$this->znamka->contains($znamka)) {
            $this->znamka[] = $znamka;
            $znamka->setZak($this);
        }

        return $this;
    }

    public function removeZnamka(Znamka $znamka): self
    {
        if ($this->znamka->contains($znamka)) {
            $this->znamka->removeElement($znamka);
            // set the owning side to null (unless already changed)
            if ($znamka->getZak() === $this) {
                $znamka->setZak(null);
            }
        }

        return $this;
    }

    public function getPsc(): ?int
    {
        return $this->psc;
    }

    public function setPsc(?int $psc): self
    {
        $this->psc = $psc;

        return $this;
    }

    public function getPoznamka(): ?string
    {
        return $this->poznamka;
    }

    public function setPoznamka(?string $poznamka): self
    {
        $this->poznamka = $poznamka;

        return $this;
    }

    public function getTel(): ?string
    {
        return $this->tel;
    }

    public function setTel(?string $tel): self
    {
        $this->tel = $tel;

        return $this;
    }

    public function getUser(): ?User
    {
        return $this->user;
    }

    public function setUser(?User $user): self
    {
        $this->user = $user;

        // set (or unset) the owning side of the relation if necessary
        $newZak = null === $user ? null : $this;
        if ($user->getZak() !== $newZak) {
            $user->setZak($newZak);
        }

        return $this;
    }

    /**
     * @return Collection|Historie[]
     */
    public function getHistorie(): Collection
    {
        return $this->historie;
    }

    public function addHistorie(Historie $historie): self
    {
        if (!$this->historie->contains($historie)) {
            $this->historie[] = $historie;
            $historie->addZak($this);
        }

        return $this;
    }

    public function removeHistorie(Historie $historie): self
    {
        if ($this->historie->contains($historie)) {
            $this->historie->removeElement($historie);
            $historie->removeZak($this);
        }

        return $this;
    }

    public function getRodCis(): ?string
    {
        return $this->Rod_cis;
    }

    public function setRodCis(string $Rod_cis): self
    {
        $this->Rod_cis = $Rod_cis;

        return $this;
    }

    public function getPohlavi(): ?bool
    {
        return $this->pohlavi;
    }

    public function setPohlavi(bool $pohlavi): self
    {
        $this->pohlavi = $pohlavi;

        return $this;
    }

    public function getObcanstvi(): ?string
    {
        return $this->obcanstvi;
    }

    public function setObcanstvi(string $obcanstvi): self
    {
        $this->obcanstvi = $obcanstvi;

        return $this;
    }

    public function getOP(): ?int
    {
        return $this->OP;
    }

    public function setOP(?int $OP): self
    {
        $this->OP = $OP;

        return $this;
    }

    public function getPas(): ?int
    {
        return $this->pas;
    }

    public function setPas(?int $pas): self
    {
        $this->pas = $pas;

        return $this;
    }

    public function getEmail(): ?string
    {
        return $this->email;
    }

    public function setEmail(?string $email): self
    {
        $this->email = $email;

        return $this;
    }

    public function getMCast(): ?string
    {
        return $this->m_cast;
    }

    public function setMCast(?string $m_cast): self
    {
        $this->m_cast = $m_cast;

        return $this;
    }

    public function getPredSkol(): ?string
    {
        return $this->pred_skol;
    }

    public function setPredSkol(?string $pred_skol): self
    {
        $this->pred_skol = $pred_skol;

        return $this;
    }

    public function getDatZah(): ?\DateTimeInterface
    {
        return $this->dat_zah;
    }

    public function setDatZah(\DateTimeInterface $dat_zah): self
    {
        $this->dat_zah = $dat_zah;

        return $this;
    }

    public function getDatUk(): ?\DateTimeInterface
    {
        return $this->dat_uk;
    }

    public function setDatUk(?\DateTimeInterface $dat_uk): self
    {
        $this->dat_uk = $dat_uk;

        return $this;
    }

    public function getZdPoj(): ?int
    {
        return $this->zd_poj;
    }

    public function setZdPoj(?int $zd_poj): self
    {
        $this->zd_poj = $zd_poj;

        return $this;
    }

    public function getIndStudPlan(): ?int
    {
        return $this->ind_stud_plan;
    }

    public function setIndStudPlan(int $ind_stud_plan): self
    {
        $this->ind_stud_plan = $ind_stud_plan;

        return $this;
    }

    public function getZnevyhodneni(): ?string
    {
        return $this->znevyhodneni;
    }

    public function setZnevyhodneni(?string $znevyhodneni): self
    {
        $this->znevyhodneni = $znevyhodneni;

        return $this;
    }

    public function getNadani(): ?int
    {
        return $this->nadani;
    }

    public function setNadani(?int $nadani): self
    {
        $this->nadani = $nadani;

        return $this;
    }

    public function getUprVzdProgram(): ?int
    {
        return $this->upr_vzd_program;
    }

    public function setUprVzdProgram(?int $upr_vzd_program): self
    {
        $this->upr_vzd_program = $upr_vzd_program;

        return $this;
    }

    public function getOdlKultProstredi(): ?string
    {
        return $this->odl_kult_prostredi;
    }

    public function setOdlKultProstredi(?string $odl_kult_prostredi): self
    {
        $this->odl_kult_prostredi = $odl_kult_prostredi;

        return $this;
    }

    public function getProdlDelkaVzd(): ?string
    {
        return $this->prodl_delka_vzd;
    }

    public function setProdlDelkaVzd(?string $prodl_delka_vzd): self
    {
        $this->prodl_delka_vzd = $prodl_delka_vzd;

        return $this;
    }

    public function getUpravaVystVzdel(): ?bool
    {
        return $this->uprava_vyst_vzdel;
    }

    public function setUpravaVystVzdel(?bool $uprava_vyst_vzdel): self
    {
        $this->uprava_vyst_vzdel = $uprava_vyst_vzdel;

        return $this;
    }

    public function getDatVydDoporuc(): ?\DateTimeInterface
    {
        return $this->Dat_vyd_Doporuc;
    }

    public function setDatVydDoporuc(?\DateTimeInterface $Dat_vyd_Doporuc): self
    {
        $this->Dat_vyd_Doporuc = $Dat_vyd_Doporuc;

        return $this;
    }

    public function getDatKonceDoporuc(): ?\DateTimeInterface
    {
        return $this->dat_konce_doporuc;
    }

    public function setDatKonceDoporuc(?\DateTimeInterface $dat_konce_doporuc): self
    {
        $this->dat_konce_doporuc = $dat_konce_doporuc;

        return $this;
    }

    public function getNormFinNarocnost(): ?string
    {
        return $this->norm_fin_narocnost;
    }

    public function setNormFinNarocnost(?string $norm_fin_narocnost): self
    {
        $this->norm_fin_narocnost = $norm_fin_narocnost;

        return $this;
    }

    public function getFormaPorizPomucky(): ?string
    {
        return $this->forma_poriz_pomucky;
    }

    public function setFormaPorizPomucky(?string $forma_poriz_pomucky): self
    {
        $this->forma_poriz_pomucky = $forma_poriz_pomucky;

        return $this;
    }

    public function getFinNarocnost(): ?bool
    {
        return $this->fin_narocnost;
    }

    public function setFinNarocnost(?bool $fin_narocnost): self
    {
        $this->fin_narocnost = $fin_narocnost;

        return $this;
    }

    public function getDatZahPO(): ?\DateTimeInterface
    {
        return $this->dat_zah_PO;
    }

    public function setDatZahPO(?\DateTimeInterface $dat_zah_PO): self
    {
        $this->dat_zah_PO = $dat_zah_PO;

        return $this;
    }

    public function getDatUkPO(): ?\DateTimeInterface
    {
        return $this->dat_uk_PO;
    }

    public function setDatUkPO(?\DateTimeInterface $dat_uk_PO): self
    {
        $this->dat_uk_PO = $dat_uk_PO;

        return $this;
    }

    /**
     * @return Collection|Absence[]
     */
    public function getAbsence(): Collection
    {
        return $this->absence;
    }

    public function addAbsence(Absence $absence): self
    {
        if (!$this->absence->contains($absence)) {
            $this->absence[] = $absence;
            $absence->setZak($this);
        }

        return $this;
    }

    public function removeAbsence(Absence $absence): self
    {
        if ($this->absence->contains($absence)) {
            $this->absence->removeElement($absence);
            // set the owning side to null (unless already changed)
            if ($absence->getZak() === $this) {
                $absence->setZak(null);
            }
        }

        return $this;
    }

    /**
     * @return Collection|Rodic[]
     */
    public function getRodic(): Collection
    {
        return $this->rodic;
    }

    public function addRodic(Rodic $rodic): self
    {
        if (!$this->rodic->contains($rodic)) {
            $this->rodic[] = $rodic;
            $rodic->addZak($this);
        }

        return $this;
    }

    public function removeRodic(Rodic $rodic): self
    {
        if ($this->rodic->contains($rodic)) {
            $this->rodic->removeElement($rodic);
            $rodic->removeZak($this);
        }

        return $this;
    }

    public function getKvStObc(): ?int
    {
        return $this->kv_st_obc;
    }

    public function setKvStObc(int $kv_st_obc): self
    {
        $this->kv_st_obc = $kv_st_obc;

        return $this;
    }

    public function getZahDoc(): ?string
    {
        return $this->zah_doc;
    }

    public function setZahDoc(string $zah_doc): self
    {
        $this->zah_doc = $zah_doc;

        return $this;
    }

    public function getKodUk(): ?string
    {
        return $this->kod_uk;
    }

    public function setKodUk(?string $kod_uk): self
    {
        $this->kod_uk = $kod_uk;

        return $this;
    }

    public function getPrizn(): ?int
    {
        return $this->prizn;
    }

    public function setPrizn(?int $prizn): self
    {
        $this->prizn = $prizn;

        return $this;
    }

    public function getZpusob(): ?int
    {
        return $this->zpusob;
    }

    public function setZpusob(int $zpusob): self
    {
        $this->zpusob = $zpusob;

        return $this;
    }

    public function getFin(): ?int
    {
        return $this->fin;
    }

    public function setFin(int $fin): self
    {
        $this->fin = $fin;

        return $this;
    }

    public function getDatZmen(): ?\DateTimeInterface
    {
        return $this->dat_zmen;
    }

    public function setDatZmen(?\DateTimeInterface $dat_zmen): self
    {
        $this->dat_zmen = $dat_zmen;

        return $this;
    }

    public function getKodZmen(): ?int
    {
        return $this->kod_zmen;
    }

    public function setKodZmen(?int $kod_zmen): self
    {
        $this->kod_zmen = $kod_zmen;

        return $this;
    }

    public function getKatZnev(): ?string
    {
        return $this->kat_znev;
    }

    public function setKatZnev(?string $kat_znev): self
    {
        $this->kat_znev = $kat_znev;

        return $this;
    }

    public function getPspo(): ?int
    {
        return $this->pspo;
    }

    public function setPspo(?int $pspo): self
    {
        $this->pspo = $pspo;

        return $this;
    }
}
