<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use App\Entity\Nasledok;
use App\Entity\Loc;
use App\Entity\Doc;
use App\Entity\Operator;
use App\Entity\Opatrenie;
use App\Entity\SudneKonanie;
use App\Entity\SpravneKonanie;
use Doctrine\Common\Collections\ArrayCollection;
/**
* @ORM\Table(name="es_skoda")
* @ORM\Entity(repositoryClass="App\Repository\SkodaRepository")
* @ORM\HasLifecycleCallbacks()
*/
class Skoda {
/**
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
protected $id;
/**
* @ORM\OneToMany(targetEntity="Doc", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true)
*/
protected $docs;
/**
* @ORM\OneToMany(targetEntity="Loc", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true)
*/
protected $locs;
/**
* @ORM\OneToMany(targetEntity="Operator", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true)
*/
protected $operators;
/**
* @ORM\OneToMany(targetEntity="Nasledok", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true)
*/
protected $nasledky;
/**
* @ORM\OneToMany(targetEntity="Opatrenie", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true)
*/
protected $opatrenia;
/**
* @ORM\OneToMany(targetEntity="SudneKonanie", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true)
*/
protected $suKs;
/**
* @ORM\OneToMany(targetEntity="SpravneKonanie", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true)
*/
protected $spKs;
/**
* @ORM\ManyToMany(targetEntity="Notice", mappedBy="skody")
*/
private $notices;
/**
* @ORM\Column(name="nazov", type="string", length=255, nullable=true)
*/
protected $nazov;
/**
* @ORM\Column(name="evc", type="string", length=255, unique=true, nullable=true)
*/
protected $evc;
/**
* @ORM\Column(name="s_public", type="boolean")
*/
protected $public = true;
/**
* @ORM\Column(name="druh", type="string", length=255, nullable=true)
*/
protected $druh;
/**
* @ORM\Column(name="vznik", type="datetime", nullable=true)
*/
protected $vznik;
/**
* @ORM\Column(name="zistenie", type="datetime", nullable=true)
*/
protected $zistenie;
/**
* @ORM\Column(name="WGSN", type="string", length=255, nullable=true)
*/
protected $WGSN;
/**
* @ORM\Column(name="WGSE", type="string", length=255, nullable=true)
*/
protected $WGSE;
/**
* @ORM\Column(name="priciny", type="string", length=2550, nullable=true)
*/
protected $priciny;
/**
* @ORM\Column(name="priciny_opis", type="string", length=2550, nullable=true)
*/
protected $pricinyOpis;
/**
* @ORM\Column(name="nasledky_json", type="string", length=2550, nullable=true)
*/
protected $nasledkyJSON;
/**
* @ORM\Column(name="created", type="datetime")
*/
protected $created;
/**
* @ORM\Column(name="edited", type="datetime")
*/
protected $edited;
/**
* @ORM\PrePersist()
*/
public function preCreated() {
$this->created = new \DateTime('now');
}
/**
* @ORM\PrePersist()
* @ORM\PreUpdate()
*/
public function preEdited() {
$this->edited = new \DateTime('now');
}
/**
* Constructor
*/
public function __construct($notice) {
$this->notices = new ArrayCollection();
$notice->setSkoda($this);
$this->docs = new ArrayCollection();
$this->locs = new ArrayCollection();
$this->operators = new ArrayCollection();
$this->nasledky = new ArrayCollection();
}
/**
* Get id
*
* @return integer
*/
public function getId() {
return $this->id;
}
/**
* Set nazov
*
* @param string $nazov
*
* @return Skoda
*/
public function setNazov($nazov) {
$this->nazov = $nazov;
return $this;
}
/**
* Get nazov
*
* @return string
*/
public function getNazov() {
return $this->nazov;
}
/**
* Add doc
*
* @param \App\Entity\Doc $doc
*
* @return Skoda
*/
public function addDoc(\App\Entity\Doc $doc) {
$doc->setSkoda($this);
$this->docs[] = $doc;
return $this;
}
/**
* Remove doc
*
* @param \App\Entity\Doc $doc
*/
public function removeDoc(\App\Entity\Doc $doc) {
$this->docs->removeElement($doc);
}
/**
* Get docs
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getDocs() {
return $this->docs;
}
/**
* Add loc
*
* @param \App\Entity\Loc $loc
*
* @return Skoda
*/
public function addLoc(\App\Entity\Loc $loc) {
$loc->setSkoda($this);
$this->locs[] = $loc;
return $this;
}
/**
* Remove loc
*
* @param \App\Entity\Loc $loc
*/
public function removeLoc(\App\Entity\Loc $loc) {
$this->locs->removeElement($loc);
}
/**
* Get locs
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getLocs() {
return $this->locs;
}
/**
* Add operator
*
* @param \App\Entity\Operator $operator
*
* @return Skoda
*/
public function addOperator(\App\Entity\Operator $operator) {
$operator->setSkoda($this);
$this->operators[] = $operator;
return $this;
}
/**
* Remove operator
*
* @param \App\Entity\Operator $operator
*/
public function removeOperator(\App\Entity\Operator $operator) {
$this->operators->removeElement($operator);
}
/**
* Get operators
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getOperators() {
return $this->operators;
}
/**
* Add nasledky
*
* @param \App\Entity\Nasledok $nasledky
*
* @return Skoda
*/
public function addNasledky(\App\Entity\Nasledok $nasledok) {
$nasledok->setSkoda($this);
$this->nasledky[] = $nasledok;
return $this;
}
/**
* Remove nasledky
*
* @param \App\Entity\Nasledok $nasledky
*/
public function removeNasledky(\App\Entity\Nasledok $nasledky) {
$this->nasledky->removeElement($nasledky);
}
/**
* Get nasledky
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getNasledky() {
return $this->nasledky;
}
/**
* Set druh
*
* @param string $druh
*
* @return Skoda
*/
public function setDruh($druh)
{
$this->druh = $druh;
return $this;
}
/**
* Get druh
*
* @return string
*/
public function getDruh()
{
return $this->druh;
}
/**
* Set vznik
*
* @param \DateTime $vznik
*
* @return Skoda
*/
public function setVznik($vznik) {
$this->vznik = $vznik;
return $this;
}
/**
* Get vznik
*
* @return \DateTime
*/
public function getVznik() {
return $this->vznik;
}
/**
* Set zistenie
*
* @param \DateTime $zistenie
*
* @return Skoda
*/
public function setZistenie($zistenie) {
$this->zistenie = $zistenie;
return $this;
}
/**
* Get zistenie
*
* @return \DateTime
*/
public function getZistenie() {
return $this->zistenie;
}
/**
* Set wGSN
*
* @param string $wGSN
*
* @return Skoda
*/
public function setWGSN($wGSN) {
$this->WGSN = $wGSN;
return $this;
}
/**
* Get wGSN
*
* @return string
*/
public function getWGSN() {
return $this->WGSN;
}
/**
* Set wGSE
*
* @param string $wGSE
*
* @return Skoda
*/
public function setWGSE($wGSE) {
$this->WGSE = $wGSE;
return $this;
}
/**
* Get wGSE
*
* @return string
*/
public function getWGSE() {
return $this->WGSE;
}
/**
* Set priciny
*
* @param string $priciny
*
* @return Skoda
*/
public function setPriciny($priciny) {
$this->priciny = json_encode($priciny);
return $this;
}
/**
* Get priciny
*
* @return string
*/
public function getPriciny() {
return json_decode($this->priciny, true);
}
/**
* Set pricinyOpis
*
* @param string $pricinyOpis
*
* @return Skoda
*/
public function setPricinyOpis($pricinyOpis) {
$this->pricinyOpis = $pricinyOpis;
return $this;
}
/**
* Get pricinyOpis
*
* @return string
*/
public function getPricinyOpis() {
return $this->pricinyOpis;
}
/**
* Set nasledkyJSON
*
* @param string $nasledkyJSON
*
* @return Skoda
*/
public function setNasledkyJSON($nasledkyJSON) {
$this->nasledkyJSON = json_encode($nasledkyJSON);
return $this;
}
/**
* Get nasledkyJSON
*
* @return string
*/
public function getNasledkyJSON() {
return json_decode($this->nasledkyJSON, true);
}
/**
* Set created
*
* @param \DateTime $created
*
* @return Skoda
*/
public function setCreated($created) {
$this->created = $created;
return $this;
}
/**
* Get created
*
* @return \DateTime
*/
public function getCreated() {
return $this->created;
}
/**
* Set edited
*
* @param \DateTime $edited
*
* @return Skoda
*/
public function setEdited($edited) {
$this->edited = $edited;
return $this;
}
/**
* Get edited
*
* @return \DateTime
*/
public function getEdited() {
return $this->edited;
}
/**
* Add opatrenium
*
* @param \App\Entity\Opatrenie $opatrenium
*
* @return Skoda
*/
public function addOpatrenium(\App\Entity\Opatrenie $opatrenium) {
$opatrenium->setSkoda($this);
$this->opatrenia[] = $opatrenium;
return $this;
}
/**
* Remove opatrenium
*
* @param \App\Entity\Opatrenie $opatrenium
*/
public function removeOpatrenium(\App\Entity\Opatrenie $opatrenium) {
$this->opatrenia->removeElement($opatrenium);
}
/**
* Get opatrenia
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getOpatrenia() {
return $this->opatrenia;
}
public function setOpatrenia($val) {
return $this->opatrenia = $val;
}
/**
* Add suK
*
* @param \App\Entity\SudneKonanie $suK
*
* @return Skoda
*/
public function addSuK(\App\Entity\SudneKonanie $suK) {
$suK->setSkoda($this);
$this->suKs[] = $suK;
return $this;
}
/**
* Remove suK
*
* @param \App\Entity\SudneKonanie $suK
*/
public function removeSuK(\App\Entity\SudneKonanie $suK) {
$this->suKs->removeElement($suK);
}
/**
* Get suKs
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getSuKs() {
return $this->suKs;
}
/**
* Add spK
*
* @param \App\Entity\SpravneKonanie $spK
*
* @return Skoda
*/
public function addSpK(\App\Entity\SpravneKonanie $spK) {
$spK->setSkoda($this);
$this->spKs[] = $spK;
return $this;
}
/**
* Remove spK
*
* @param \App\Entity\SpravneKonanie $spK
*/
public function removeSpK(\App\Entity\SpravneKonanie $spK) {
$this->spKs->removeElement($spK);
}
/**
* Get spKs
*
* @return \Doctrine\Common\Collections\Collection
*/
public function getSpKs() {
return $this->spKs;
}
public function getNotices() {
return $this->notices;
}
/**
* Add notice
*
* @param \App\Entity\Notice $notice
*
* @return Skoda
*/
public function addNotice(\App\Entity\Notice $notice)
{
$this->notices[] = $notice;
$notice->setSkoda($this);
return $this;
}
/**
* Remove notice
*
* @param \App\Entity\Notice $notice
*/
public function removeNotice(\App\Entity\Notice $notice)
{
$this->notices->removeElement($notice);
}
/**
* Set evc
*
* @param string $evc
*
* @return Skoda
*/
public function setEvc($evc)
{
$this->evc = $evc;
return $this;
}
/**
* Get evc
*
* @return string
*/
public function getEvc()
{
return $this->evc;
}
/**
* Set public
*
* @param boolean $public
*
* @return Skoda
*/
public function setPublic($public)
{
$this->public = $public;
return $this;
}
/**
* Get public
*
* @return boolean
*/
public function getPublic()
{
return $this->public;
}
}