src/Entity/Opatrenie.php line 14

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Entity\Skoda;
  5. use App\Entity\Doc;
  6. /** 
  7.  * @ORM\Table(name="es_opatrenie")
  8.  * @ORM\Entity() 
  9.  * @ORM\HasLifecycleCallbacks()
  10.  */
  11. class Opatrenie {
  12.     /** 
  13.      * @ORM\Column(name="id", type="integer")     
  14.      * @ORM\Id     
  15.      * @ORM\GeneratedValue(strategy="AUTO")     
  16.      */
  17.     protected $id;
  18.     /**
  19.      * Many Operators have one (the same) Skoda
  20.      * @ORM\ManyToOne(targetEntity="Skoda", inversedBy="opatrenia")
  21.      * @ORM\JoinColumn(name="skoda_id", referencedColumnName="id")
  22.      */
  23.     private $skoda;
  24.     /**
  25.      * @ORM\OneToMany(targetEntity="Doc", mappedBy="opatrenie", cascade={"persist"}, orphanRemoval=true) 
  26.      */
  27.     protected $docs;
  28.     /** 
  29.      * @ORM\Column(name="druh", type="string", length=255, nullable=true)     
  30.      */
  31.     protected $druh;
  32.     /** 
  33.      * @ORM\Column(name="opatrenie", type="string", length=255, nullable=true)     
  34.      */
  35.     protected $opatrenie;
  36.     /** 
  37.      * @ORM\Column(name="ok_naprava", type="string", length=255, nullable=true)     
  38.      */
  39.     protected $okNaprava;
  40.     /** 
  41.      * @ORM\Column(name="dod_naprava", type="string", length=255, nullable=true)     
  42.      */
  43.     protected $dodNaprava;
  44.     /** 
  45.      * @ORM\Column(name="vysledok_key", type="string", length=255, nullable=true)     
  46.      */
  47.     protected $vysledokKey;
  48.     /** 
  49.      * @ORM\Column(name="vysledok", type="string", length=3000, nullable=true)     
  50.      */
  51.     protected $vysledok;
  52.     /** 
  53.      * @ORM\Column(name="datumy", type="string", length=255, nullable=true)     
  54.      */
  55.     protected $datumy;
  56.     /** 
  57.      * @ORM\Column(name="popis", type="string", length=3000, nullable=true)     
  58.      */
  59.     protected $popis;
  60.     /** 
  61.      * @ORM\Column(name="naklady", type="string", length=255, nullable=true)     
  62.      */
  63.     protected $naklady;
  64.     /** 
  65.      * @ORM\Column(name="dov_nez", type="string", length=255, nullable=true)     
  66.      */
  67.     protected $dovNez;
  68.     /** 
  69.      * @ORM\Column(name="vyn_fin", type="string", length=2500, nullable=true)     
  70.      */
  71.     protected $vynFin;
  72.     /** 
  73.      * @ORM\Column(name="poznamka", type="string", length=2500, nullable=true)     
  74.      */
  75.     protected $poznamka;
  76.     
  77.      
  78.     /**
  79.      * @ORM\Column(name="created", type="datetime")
  80.      */
  81.     protected $created;
  82.     /**
  83.      * @ORM\Column(name="edited", type="datetime")
  84.      */
  85.     protected $edited;
  86.     
  87.     /** 
  88.      * @ORM\PrePersist()
  89.      */
  90.     public function preCreated() {
  91.         $this->created = new \DateTime('now');
  92.     }
  93.     /** 
  94.      * @ORM\PrePersist()
  95.      * @ORM\PreUpdate() 
  96.      */
  97.     public function preEdited() {
  98.         $this->edited = new \DateTime('now');
  99.     }
  100.     /**
  101.      * Get id
  102.      *
  103.      * @return integer
  104.      */
  105.     public function getId() {
  106.         return $this->id;
  107.     }
  108.     /**
  109.      * Set skoda
  110.      *
  111.      * @param \App\Entity\Skoda $skoda
  112.      *
  113.      * @return Operator
  114.      */
  115.     public function setSkoda(\App\Entity\Skoda $skoda null) {
  116.         $this->skoda $skoda;
  117.         return $this;
  118.     }
  119.     /**
  120.      * Get skoda
  121.      *
  122.      * @return \App\Entity\Skoda
  123.      */
  124.     public function getSkoda() {
  125.         return $this->skoda;
  126.     }
  127.     /**
  128.      * Set druh
  129.      *
  130.      * @param string $druh
  131.      *
  132.      * @return Opatrenie
  133.      */
  134.     public function setDruh($druh)
  135.     {
  136.         $this->druh $druh;
  137.         return $this;
  138.     }
  139.     /**
  140.      * Get druh
  141.      *
  142.      * @return string
  143.      */
  144.     public function getDruh()
  145.     {
  146.         return $this->druh;
  147.     }
  148.     /**
  149.      * Set opatrenie
  150.      *
  151.      * @param string $opatrenie
  152.      *
  153.      * @return Opatrenie
  154.      */
  155.     public function setOpatrenie($opatrenie)
  156.     {
  157.         $this->opatrenie $opatrenie;
  158.         return $this;
  159.     }
  160.     /**
  161.      * Get opatrenie
  162.      *
  163.      * @return string
  164.      */
  165.     public function getOpatrenie()
  166.     {
  167.         return $this->opatrenie;
  168.     }
  169.     /**
  170.      * Set okNaprava
  171.      *
  172.      * @param string $okNaprava
  173.      *
  174.      * @return Opatrenie
  175.      */
  176.     public function setOkNaprava($okNaprava)
  177.     {
  178.         $this->okNaprava $okNaprava;
  179.         return $this;
  180.     }
  181.     /**
  182.      * Get okNaprava
  183.      *
  184.      * @return string
  185.      */
  186.     public function getOkNaprava()
  187.     {
  188.         return $this->okNaprava;
  189.     }
  190.     /**
  191.      * Set dodNaprava
  192.      *
  193.      * @param string $dodNaprava
  194.      *
  195.      * @return Opatrenie
  196.      */
  197.     public function setDodNaprava($dodNaprava)
  198.     {
  199.         $this->dodNaprava $dodNaprava;
  200.         return $this;
  201.     }
  202.     /**
  203.      * Get dodNaprava
  204.      *
  205.      * @return string
  206.      */
  207.     public function getDodNaprava()
  208.     {
  209.         return $this->dodNaprava;
  210.     }
  211.     /**
  212.      * Set vysledokKey
  213.      *
  214.      * @param string $vysledokKey
  215.      *
  216.      * @return Opatrenie
  217.      */
  218.     public function setVysledokKey($vysledokKey)
  219.     {
  220.         $this->vysledokKey $vysledokKey;
  221.         return $this;
  222.     }
  223.     /**
  224.      * Get vysledokKey
  225.      *
  226.      * @return string
  227.      */
  228.     public function getVysledokKey()
  229.     {
  230.         return $this->vysledokKey;
  231.     }
  232.     /**
  233.      * Set vysledok
  234.      *
  235.      * @param string $vysledok
  236.      *
  237.      * @return Opatrenie
  238.      */
  239.     public function setVysledok($vysledok)
  240.     {
  241.         $this->vysledok $vysledok;
  242.         return $this;
  243.     }
  244.     /**
  245.      * Get vysledok
  246.      *
  247.      * @return string
  248.      */
  249.     public function getVysledok()
  250.     {
  251.         return $this->vysledok;
  252.     }
  253.     /**
  254.      * Set datumy
  255.      *
  256.      * @param string $datumy
  257.      *
  258.      * @return Opatrenie
  259.      */
  260.     public function setDatumy($datumy)
  261.     {
  262.         $this->datumy $datumy;
  263.         return $this;
  264.     }
  265.     /**
  266.      * Get datumy
  267.      *
  268.      * @return string
  269.      */
  270.     public function getDatumy()
  271.     {
  272.         return $this->datumy;
  273.     }
  274.     /**
  275.      * Set popis
  276.      *
  277.      * @param string $popis
  278.      *
  279.      * @return Opatrenie
  280.      */
  281.     public function setPopis($popis)
  282.     {
  283.         $this->popis $popis;
  284.         return $this;
  285.     }
  286.     /**
  287.      * Get popis
  288.      *
  289.      * @return string
  290.      */
  291.     public function getPopis()
  292.     {
  293.         return $this->popis;
  294.     }
  295.     /**
  296.      * Set naklady
  297.      *
  298.      * @param string $naklady
  299.      *
  300.      * @return Opatrenie
  301.      */
  302.     public function setNaklady($naklady)
  303.     {
  304.         $this->naklady $naklady;
  305.         return $this;
  306.     }
  307.     /**
  308.      * Get naklady
  309.      *
  310.      * @return string
  311.      */
  312.     public function getNaklady()
  313.     {
  314.         return $this->naklady;
  315.     }
  316.     /**
  317.      * Set dovNez
  318.      *
  319.      * @param string $dovNez
  320.      *
  321.      * @return Opatrenie
  322.      */
  323.     public function setDovNez($dovNez)
  324.     {
  325.         $this->dovNez $dovNez;
  326.         return $this;
  327.     }
  328.     /**
  329.      * Get dovNez
  330.      *
  331.      * @return string
  332.      */
  333.     public function getDovNez()
  334.     {
  335.         return $this->dovNez;
  336.     }
  337.     /**
  338.      * Set vynFin
  339.      *
  340.      * @param string $vynFin
  341.      *
  342.      * @return Opatrenie
  343.      */
  344.     public function setVynFin($vynFin)
  345.     {
  346.         $this->vynFin $vynFin;
  347.         return $this;
  348.     }
  349.     /**
  350.      * Get vynFin
  351.      *
  352.      * @return string
  353.      */
  354.     public function getVynFin()
  355.     {
  356.         return $this->vynFin;
  357.     }
  358.     /**
  359.      * Set poznamka
  360.      *
  361.      * @param string $poznamka
  362.      *
  363.      * @return Opatrenie
  364.      */
  365.     public function setPoznamka($poznamka)
  366.     {
  367.         $this->poznamka $poznamka;
  368.         return $this;
  369.     }
  370.     /**
  371.      * Get poznamka
  372.      *
  373.      * @return string
  374.      */
  375.     public function getPoznamka()
  376.     {
  377.         return $this->poznamka;
  378.     }
  379.     /**
  380.      * Set created
  381.      *
  382.      * @param \DateTime $created
  383.      *
  384.      * @return Opatrenie
  385.      */
  386.     public function setCreated($created)
  387.     {
  388.         $this->created $created;
  389.         return $this;
  390.     }
  391.     /**
  392.      * Get created
  393.      *
  394.      * @return \DateTime
  395.      */
  396.     public function getCreated()
  397.     {
  398.         return $this->created;
  399.     }
  400.     /**
  401.      * Set edited
  402.      *
  403.      * @param \DateTime $edited
  404.      *
  405.      * @return Opatrenie
  406.      */
  407.     public function setEdited($edited)
  408.     {
  409.         $this->edited $edited;
  410.         return $this;
  411.     }
  412.     /**
  413.      * Get edited
  414.      *
  415.      * @return \DateTime
  416.      */
  417.     public function getEdited()
  418.     {
  419.         return $this->edited;
  420.     }
  421.     /**
  422.      * Constructor
  423.      */
  424.     public function __construct()
  425.     {
  426.         $this->docs = new \Doctrine\Common\Collections\ArrayCollection();
  427.     }
  428.     /**
  429.      * Add doc
  430.      *
  431.      * @param \App\Entity\Doc $doc
  432.      *
  433.      * @return Opatrenie
  434.      */
  435.     public function addDoc(\App\Entity\Doc $doc)
  436.     {
  437.         $doc->setOpatrenie($this);
  438.         $this->docs[] = $doc;
  439.         return $this;
  440.     }
  441.     /**
  442.      * Remove doc
  443.      *
  444.      * @param \App\Entity\Doc $doc
  445.      */
  446.     public function removeDoc(\App\Entity\Doc $doc)
  447.     {
  448.         $this->docs->removeElement($doc);
  449.     }
  450.     /**
  451.      * Get docs
  452.      *
  453.      * @return \Doctrine\Common\Collections\Collection
  454.      */
  455.     public function getDocs()
  456.     {
  457.         return $this->docs;
  458.     }
  459. }