src/Entity/Skoda.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\Nasledok;
  5. use App\Entity\Loc;
  6. use App\Entity\Doc;
  7. use App\Entity\Operator;
  8. use App\Entity\Opatrenie;
  9. use App\Entity\SudneKonanie;
  10. use App\Entity\SpravneKonanie;
  11. use Doctrine\Common\Collections\ArrayCollection;
  12. /**
  13.  * @ORM\Table(name="es_skoda")
  14.  * @ORM\Entity(repositoryClass="App\Repository\SkodaRepository")
  15.  * @ORM\HasLifecycleCallbacks()
  16.  */
  17. class Skoda {
  18.     /**
  19.      * @ORM\Column(name="id", type="integer")     
  20.      * @ORM\Id     
  21.      * @ORM\GeneratedValue(strategy="AUTO")     
  22.      */
  23.     protected $id;
  24.     /**
  25.      * @ORM\OneToMany(targetEntity="Doc", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true) 
  26.      */
  27.     protected $docs;
  28.     /**
  29.      * @ORM\OneToMany(targetEntity="Loc", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true) 
  30.      */
  31.     protected $locs;
  32.     /**
  33.      * @ORM\OneToMany(targetEntity="Operator", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true) 
  34.      */
  35.     protected $operators;
  36.     /**
  37.      * @ORM\OneToMany(targetEntity="Nasledok", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true) 
  38.      */
  39.     protected $nasledky;
  40.     /**
  41.      * @ORM\OneToMany(targetEntity="Opatrenie", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true) 
  42.      */
  43.     protected $opatrenia;
  44.     /**
  45.      * @ORM\OneToMany(targetEntity="SudneKonanie", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true) 
  46.      */
  47.     protected $suKs;
  48.     /**
  49.      * @ORM\OneToMany(targetEntity="SpravneKonanie", mappedBy="skoda", cascade={"persist"}, orphanRemoval=true) 
  50.      */
  51.     protected $spKs;
  52.     /**
  53.      * @ORM\ManyToMany(targetEntity="Notice", mappedBy="skody")
  54.      */
  55.     private $notices;
  56.     /**
  57.      *  @ORM\Column(name="nazov", type="string", length=255, nullable=true)    
  58.      */
  59.     protected $nazov;
  60.     /**
  61.      *  @ORM\Column(name="evc", type="string", length=255, unique=true, nullable=true)    
  62.      */
  63.     protected $evc;
  64.     
  65.         /**
  66.      *  @ORM\Column(name="s_public", type="boolean")    
  67.      */
  68.     protected $public true;
  69.     
  70.     /**
  71.      * @ORM\Column(name="druh", type="string", length=255, nullable=true)     
  72.      */
  73.     protected $druh;
  74.     /**
  75.      * @ORM\Column(name="vznik", type="datetime", nullable=true)      
  76.      */
  77.     protected $vznik;
  78.     /**
  79.      * @ORM\Column(name="zistenie", type="datetime", nullable=true)     
  80.      */
  81.     protected $zistenie;
  82.     /**
  83.      * @ORM\Column(name="WGSN", type="string", length=255, nullable=true)     
  84.      */
  85.     protected $WGSN;
  86.     /**
  87.      * @ORM\Column(name="WGSE", type="string", length=255, nullable=true)     
  88.      */
  89.     protected $WGSE;
  90.     /**
  91.      * @ORM\Column(name="priciny", type="string", length=2550, nullable=true)     
  92.      */
  93.     protected $priciny;
  94.     /**
  95.      * @ORM\Column(name="priciny_opis", type="string", length=2550, nullable=true)     
  96.      */
  97.     protected $pricinyOpis;
  98.     /**
  99.      * @ORM\Column(name="nasledky_json", type="string", length=2550, nullable=true)     
  100.      */
  101.     protected $nasledkyJSON;
  102.     /**
  103.      * @ORM\Column(name="created", type="datetime")
  104.      */
  105.     protected $created;
  106.     /**
  107.      * @ORM\Column(name="edited", type="datetime")
  108.      */
  109.     protected $edited;
  110.     /**
  111.      * @ORM\PrePersist()
  112.      */
  113.     public function preCreated() {
  114.         $this->created = new \DateTime('now');
  115.     }
  116.     /**
  117.      * @ORM\PrePersist()
  118.      * @ORM\PreUpdate() 
  119.      */
  120.     public function preEdited() {
  121.         $this->edited = new \DateTime('now');
  122.     }
  123.     /**
  124.      * Constructor
  125.      */
  126.     public function __construct($notice) {
  127.         $this->notices = new ArrayCollection();
  128.         $notice->setSkoda($this);
  129.         $this->docs = new ArrayCollection();
  130.         $this->locs = new ArrayCollection();
  131.         $this->operators = new ArrayCollection();
  132.         $this->nasledky = new ArrayCollection();
  133.     }
  134.     /**
  135.      * Get id
  136.      *
  137.      * @return integer
  138.      */
  139.     public function getId() {
  140.         return $this->id;
  141.     }
  142.     /**
  143.      * Set nazov
  144.      *
  145.      * @param string $nazov
  146.      *
  147.      * @return Skoda
  148.      */
  149.     public function setNazov($nazov) {
  150.         $this->nazov $nazov;
  151.         return $this;
  152.     }
  153.     /**
  154.      * Get nazov
  155.      *
  156.      * @return string
  157.      */
  158.     public function getNazov() {
  159.         return $this->nazov;
  160.     }
  161.     /**
  162.      * Add doc
  163.      *
  164.      * @param \App\Entity\Doc $doc
  165.      *
  166.      * @return Skoda
  167.      */
  168.     public function addDoc(\App\Entity\Doc $doc) {
  169.         $doc->setSkoda($this);
  170.         $this->docs[] = $doc;
  171.         return $this;
  172.     }
  173.     /**
  174.      * Remove doc
  175.      *
  176.      * @param \App\Entity\Doc $doc
  177.      */
  178.     public function removeDoc(\App\Entity\Doc $doc) {
  179.         $this->docs->removeElement($doc);
  180.     }
  181.     /**
  182.      * Get docs
  183.      *
  184.      * @return \Doctrine\Common\Collections\Collection
  185.      */
  186.     public function getDocs() {
  187.         return $this->docs;
  188.     }
  189.     /**
  190.      * Add loc
  191.      *
  192.      * @param \App\Entity\Loc $loc
  193.      *
  194.      * @return Skoda
  195.      */
  196.     public function addLoc(\App\Entity\Loc $loc) {
  197.         $loc->setSkoda($this);
  198.         $this->locs[] = $loc;
  199.         return $this;
  200.     }
  201.     /**
  202.      * Remove loc
  203.      *
  204.      * @param \App\Entity\Loc $loc
  205.      */
  206.     public function removeLoc(\App\Entity\Loc $loc) {
  207.         $this->locs->removeElement($loc);
  208.     }
  209.     /**
  210.      * Get locs
  211.      *
  212.      * @return \Doctrine\Common\Collections\Collection
  213.      */
  214.     public function getLocs() {
  215.         return $this->locs;
  216.     }
  217.     /**
  218.      * Add operator
  219.      *
  220.      * @param \App\Entity\Operator $operator
  221.      *
  222.      * @return Skoda
  223.      */
  224.     public function addOperator(\App\Entity\Operator $operator) {
  225.         $operator->setSkoda($this);
  226.         $this->operators[] = $operator;
  227.         return $this;
  228.     }
  229.     /**
  230.      * Remove operator
  231.      *
  232.      * @param \App\Entity\Operator $operator
  233.      */
  234.     public function removeOperator(\App\Entity\Operator $operator) {
  235.         $this->operators->removeElement($operator);
  236.     }
  237.     /**
  238.      * Get operators
  239.      *
  240.      * @return \Doctrine\Common\Collections\Collection
  241.      */
  242.     public function getOperators() {
  243.         return $this->operators;
  244.     }
  245.     /**
  246.      * Add nasledky
  247.      *
  248.      * @param \App\Entity\Nasledok $nasledky
  249.      *
  250.      * @return Skoda
  251.      */
  252.     public function addNasledky(\App\Entity\Nasledok $nasledok) {
  253.         $nasledok->setSkoda($this);
  254.         $this->nasledky[] = $nasledok;
  255.         return $this;
  256.     }
  257.     /**
  258.      * Remove nasledky
  259.      *
  260.      * @param \App\Entity\Nasledok $nasledky
  261.      */
  262.     public function removeNasledky(\App\Entity\Nasledok $nasledky) {
  263.         $this->nasledky->removeElement($nasledky);
  264.     }
  265.     /**
  266.      * Get nasledky
  267.      *
  268.      * @return \Doctrine\Common\Collections\Collection
  269.      */
  270.     public function getNasledky() {
  271.         return $this->nasledky;
  272.     }
  273.     /**
  274.      * Set druh
  275.      *
  276.      * @param string $druh
  277.      *
  278.      * @return Skoda
  279.      */
  280.     public function setDruh($druh)
  281.     {
  282.         $this->druh $druh;
  283.         return $this;
  284.     }
  285.     /**
  286.      * Get druh
  287.      *
  288.      * @return string
  289.      */
  290.     public function getDruh()
  291.     {
  292.         return $this->druh;
  293.     }
  294.     /**
  295.      * Set vznik
  296.      *
  297.      * @param \DateTime $vznik
  298.      *
  299.      * @return Skoda
  300.      */
  301.     public function setVznik($vznik) {
  302.         $this->vznik $vznik;
  303.         return $this;
  304.     }
  305.     /**
  306.      * Get vznik
  307.      *
  308.      * @return \DateTime
  309.      */
  310.     public function getVznik() {
  311.         return $this->vznik;
  312.     }
  313.     /**
  314.      * Set zistenie
  315.      *
  316.      * @param \DateTime $zistenie
  317.      *
  318.      * @return Skoda
  319.      */
  320.     public function setZistenie($zistenie) {
  321.         $this->zistenie $zistenie;
  322.         return $this;
  323.     }
  324.     /**
  325.      * Get zistenie
  326.      *
  327.      * @return \DateTime
  328.      */
  329.     public function getZistenie() {
  330.         return $this->zistenie;
  331.     }
  332.     /**
  333.      * Set wGSN
  334.      *
  335.      * @param string $wGSN
  336.      *
  337.      * @return Skoda
  338.      */
  339.     public function setWGSN($wGSN) {
  340.         $this->WGSN $wGSN;
  341.         return $this;
  342.     }
  343.     /**
  344.      * Get wGSN
  345.      *
  346.      * @return string
  347.      */
  348.     public function getWGSN() {
  349.         return $this->WGSN;
  350.     }
  351.     /**
  352.      * Set wGSE
  353.      *
  354.      * @param string $wGSE
  355.      *
  356.      * @return Skoda
  357.      */
  358.     public function setWGSE($wGSE) {
  359.         $this->WGSE $wGSE;
  360.         return $this;
  361.     }
  362.     /**
  363.      * Get wGSE
  364.      *
  365.      * @return string
  366.      */
  367.     public function getWGSE() {
  368.         return $this->WGSE;
  369.     }
  370.     /**
  371.      * Set priciny
  372.      *
  373.      * @param string $priciny
  374.      *
  375.      * @return Skoda
  376.      */
  377.     public function setPriciny($priciny) {
  378.         $this->priciny json_encode($priciny);
  379.         return $this;
  380.     }
  381.     /**
  382.      * Get priciny
  383.      *
  384.      * @return string
  385.      */
  386.     public function getPriciny() {
  387.         return json_decode($this->pricinytrue);
  388.     }
  389.     /**
  390.      * Set pricinyOpis
  391.      *
  392.      * @param string $pricinyOpis
  393.      *
  394.      * @return Skoda
  395.      */
  396.     public function setPricinyOpis($pricinyOpis) {
  397.         $this->pricinyOpis $pricinyOpis;
  398.         return $this;
  399.     }
  400.     /**
  401.      * Get pricinyOpis
  402.      *
  403.      * @return string
  404.      */
  405.     public function getPricinyOpis() {
  406.         return $this->pricinyOpis;
  407.     }
  408.     /**
  409.      * Set nasledkyJSON
  410.      *
  411.      * @param string $nasledkyJSON
  412.      *
  413.      * @return Skoda
  414.      */
  415.     public function setNasledkyJSON($nasledkyJSON) {
  416.         $this->nasledkyJSON json_encode($nasledkyJSON);
  417.         return $this;
  418.     }
  419.     /**
  420.      * Get nasledkyJSON
  421.      *
  422.      * @return string
  423.      */
  424.     public function getNasledkyJSON() {
  425.         return json_decode($this->nasledkyJSONtrue);
  426.     }
  427.     /**
  428.      * Set created
  429.      *
  430.      * @param \DateTime $created
  431.      *
  432.      * @return Skoda
  433.      */
  434.     public function setCreated($created) {
  435.         $this->created $created;
  436.         return $this;
  437.     }
  438.     /**
  439.      * Get created
  440.      *
  441.      * @return \DateTime
  442.      */
  443.     public function getCreated() {
  444.         return $this->created;
  445.     }
  446.     /**
  447.      * Set edited
  448.      *
  449.      * @param \DateTime $edited
  450.      *
  451.      * @return Skoda
  452.      */
  453.     public function setEdited($edited) {
  454.         $this->edited $edited;
  455.         return $this;
  456.     }
  457.     /**
  458.      * Get edited
  459.      *
  460.      * @return \DateTime
  461.      */
  462.     public function getEdited() {
  463.         return $this->edited;
  464.     }
  465.     /**
  466.      * Add opatrenium
  467.      *
  468.      * @param \App\Entity\Opatrenie $opatrenium
  469.      *
  470.      * @return Skoda
  471.      */
  472.     public function addOpatrenium(\App\Entity\Opatrenie $opatrenium) {
  473.         $opatrenium->setSkoda($this);
  474.         $this->opatrenia[] = $opatrenium;
  475.         return $this;
  476.     }
  477.     /**
  478.      * Remove opatrenium
  479.      *
  480.      * @param \App\Entity\Opatrenie $opatrenium
  481.      */
  482.     public function removeOpatrenium(\App\Entity\Opatrenie $opatrenium) {
  483.         $this->opatrenia->removeElement($opatrenium);
  484.     }
  485.     /**
  486.      * Get opatrenia
  487.      *
  488.      * @return \Doctrine\Common\Collections\Collection
  489.      */
  490.     public function getOpatrenia() {
  491.         return $this->opatrenia;
  492.     }
  493.     
  494.     public function setOpatrenia($val) {
  495.         return $this->opatrenia $val;
  496.     }
  497.     /**
  498.      * Add suK
  499.      *
  500.      * @param \App\Entity\SudneKonanie $suK
  501.      *
  502.      * @return Skoda
  503.      */
  504.     public function addSuK(\App\Entity\SudneKonanie $suK) {
  505.         $suK->setSkoda($this);
  506.         $this->suKs[] = $suK;
  507.         return $this;
  508.     }
  509.     /**
  510.      * Remove suK
  511.      *
  512.      * @param \App\Entity\SudneKonanie $suK
  513.      */
  514.     public function removeSuK(\App\Entity\SudneKonanie $suK) {
  515.         $this->suKs->removeElement($suK);
  516.     }
  517.     /**
  518.      * Get suKs
  519.      *
  520.      * @return \Doctrine\Common\Collections\Collection
  521.      */
  522.     public function getSuKs() {
  523.         return $this->suKs;
  524.     }
  525.     /**
  526.      * Add spK
  527.      *
  528.      * @param \App\Entity\SpravneKonanie $spK
  529.      *
  530.      * @return Skoda
  531.      */
  532.     public function addSpK(\App\Entity\SpravneKonanie $spK) {
  533.         $spK->setSkoda($this);
  534.         $this->spKs[] = $spK;
  535.         return $this;
  536.     }
  537.     /**
  538.      * Remove spK
  539.      *
  540.      * @param \App\Entity\SpravneKonanie $spK
  541.      */
  542.     public function removeSpK(\App\Entity\SpravneKonanie $spK) {
  543.         $this->spKs->removeElement($spK);
  544.     }
  545.     /**
  546.      * Get spKs
  547.      *
  548.      * @return \Doctrine\Common\Collections\Collection
  549.      */
  550.     public function getSpKs() {
  551.         return $this->spKs;
  552.     }
  553.     
  554.     
  555.     
  556.     public function getNotices() {
  557.         return $this->notices;
  558.     }
  559.     /**
  560.      * Add notice
  561.      *
  562.      * @param \App\Entity\Notice $notice
  563.      *
  564.      * @return Skoda
  565.      */
  566.     public function addNotice(\App\Entity\Notice $notice)
  567.     {
  568.         $this->notices[] = $notice;
  569.         $notice->setSkoda($this);
  570.         return $this;
  571.     }
  572.     /**
  573.      * Remove notice
  574.      *
  575.      * @param \App\Entity\Notice $notice
  576.      */
  577.     public function removeNotice(\App\Entity\Notice $notice)
  578.     {
  579.         $this->notices->removeElement($notice);
  580.     }
  581.     /**
  582.      * Set evc
  583.      *
  584.      * @param string $evc
  585.      *
  586.      * @return Skoda
  587.      */
  588.     public function setEvc($evc)
  589.     {
  590.         $this->evc $evc;
  591.         return $this;
  592.     }
  593.     /**
  594.      * Get evc
  595.      *
  596.      * @return string
  597.      */
  598.     public function getEvc()
  599.     {
  600.         return $this->evc;
  601.     }
  602.     /**
  603.      * Set public
  604.      *
  605.      * @param boolean $public
  606.      *
  607.      * @return Skoda
  608.      */
  609.     public function setPublic($public)
  610.     {
  611.         $this->public $public;
  612.         return $this;
  613.     }
  614.     /**
  615.      * Get public
  616.      *
  617.      * @return boolean
  618.      */
  619.     public function getPublic()
  620.     {
  621.         return $this->public;
  622.     }
  623. }