src/Entity/Doc.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Notice;
  4. use App\Entity\Skoda;
  5. use App\Entity\Opatrenie;
  6. use App\Entity\SpravneKonanie;
  7. use App\Entity\SudneKonanie;
  8. use Doctrine\ORM\Mapping as ORM;
  9. //use App\Services\FileManager;
  10. /**
  11.  * Document
  12.  *
  13.  * @ORM\Table(name="es_doc")
  14.  * @ORM\Entity()
  15.  * @ORM\HasLifecycleCallbacks()
  16.  */
  17. class Doc {
  18.     /**
  19.      * @var int
  20.      *
  21.      * @ORM\Column(name="id", type="integer")
  22.      * @ORM\Id
  23.      * @ORM\GeneratedValue(strategy="AUTO")
  24.      */
  25.     private $id;
  26.     /**
  27.      * @var string
  28.      *
  29.      * @ORM\Column(name="d_name", type="string", length=255, nullable=true)
  30.      */
  31.     private $name;
  32.     /**
  33.      * @var string
  34.      *
  35.      * @ORM\Column(name="full_name", type="string", length=255, nullable=true)
  36.      */
  37.     private $fullName;
  38.     /**
  39.      * @var string
  40.      *
  41.      * @ORM\Column(name="popis", type="string", length=255, nullable=true)
  42.      */
  43.     private $popis;
  44.     /**
  45.      * @var string
  46.      *
  47.      * @ORM\Column(name="d_type", type="string", length=255, nullable=true)
  48.      */
  49.     private $type;
  50.     /**
  51.      * @var string
  52.      *
  53.      * @ORM\Column(name="d_size", type="string", length=255, nullable=true)
  54.      */
  55.     private $size;
  56.     /**
  57.      * @var string
  58.      *
  59.      * @ORM\Column(name="d_url", type="string", length=255, nullable=true)
  60.      */
  61.     private $url;
  62.     /**
  63.      * @ORM\Column(name="d_public", type="boolean") 
  64.      */
  65.     protected $public false;
  66.     /**
  67.      * Many Documents have one (the same) Podnet
  68.      * @ORM\ManyToOne(targetEntity="Notice", inversedBy="docs")
  69.      * @ORM\JoinColumn(name="notice_id", referencedColumnName="id")
  70.      */
  71.     private $notice;
  72.     /**
  73.      * Many Documents have one (the same) Skoda
  74.      * @ORM\ManyToOne(targetEntity="Skoda", inversedBy="docs")
  75.      * @ORM\JoinColumn(name="skoda_id", referencedColumnName="id")
  76.      */
  77.     private $skoda;
  78.     /**
  79.      * Many Documents have one (the same) opa
  80.      * @ORM\ManyToOne(targetEntity="Opatrenie", inversedBy="docs")
  81.      * @ORM\JoinColumn(name="opa_id", referencedColumnName="id")
  82.      */
  83.     private $opatrenie;
  84.     /**
  85.      * Many Documents have one (the same) spk
  86.      * @ORM\ManyToOne(targetEntity="SpravneKonanie", inversedBy="docs")
  87.      * @ORM\JoinColumn(name="spk_id", referencedColumnName="id")
  88.      */
  89.     private $spk;
  90.     /**
  91.      * Many Documents have one (the same) suk
  92.      * @ORM\ManyToOne(targetEntity="SudneKonanie", inversedBy="docs")
  93.      * @ORM\JoinColumn(name="suk_id", referencedColumnName="id")
  94.      */
  95.     private $suk;
  96.     /**
  97.      * @ORM\Column(name="created", type="datetime")
  98.      */
  99.     protected $created;
  100.     /**
  101.      * @ORM\Column(name="edited", type="datetime")
  102.      */
  103.     protected $edited;
  104.     /**
  105.      * @ORM\PrePersist()
  106.      */
  107.     public function preCreated() {
  108.         $this->created = new \DateTime('now');
  109.     }
  110.     /**
  111.      * @ORM\PrePersist()
  112.      * @ORM\PreUpdate() 
  113.      */
  114.     public function preEdited() {
  115.         $this->edited = new \DateTime('now');
  116.     }
  117.     /**
  118.      * Get id
  119.      *
  120.      * @return integer
  121.      */
  122.     public function getId() {
  123.         return $this->id;
  124.     }
  125.     /**
  126.      * Set name
  127.      *
  128.      * @param string $name
  129.      *
  130.      * @return Doc
  131.      */
  132.     public function setName($name) {
  133.         $this->name $name;
  134.         return $this;
  135.     }
  136.     /**
  137.      * Get name
  138.      *
  139.      * @return string
  140.      */
  141.     public function getName() {
  142.         return $this->name;
  143.     }
  144.     /**
  145.      * Set fullName
  146.      *
  147.      * @param string $fullName
  148.      *
  149.      * @return Doc
  150.      */
  151.     public function setFullName($fullName) {
  152.         $this->fullName $fullName;
  153.         return $this;
  154.     }
  155.     /**
  156.      * Get fullName
  157.      *
  158.      * @return string
  159.      */
  160.     public function getFullName() {
  161.         return $this->fullName;
  162.     }
  163.     /**
  164.      * Set popis
  165.      *
  166.      * @param string $popis
  167.      *
  168.      * @return Doc
  169.      */
  170.     public function setPopis($popis) {
  171.         $this->popis $popis;
  172.         return $this;
  173.     }
  174.     /**
  175.      * Get popis
  176.      *
  177.      * @return string
  178.      */
  179.     public function getPopis() {
  180.         return $this->popis;
  181.     }
  182.     /**
  183.      * Set type
  184.      *
  185.      * @param string $type
  186.      *
  187.      * @return Doc
  188.      */
  189.     public function setType($type) {
  190.         $this->type $type;
  191.         return $this;
  192.     }
  193.     /**
  194.      * Get type
  195.      *
  196.      * @return string
  197.      */
  198.     public function getType() {
  199.         return $this->type;
  200.     }
  201.     /**
  202.      * Set size
  203.      *
  204.      * @param string $size
  205.      *
  206.      * @return Doc
  207.      */
  208.     public function setSize($size) {
  209.         $this->size $size;
  210.         return $this;
  211.     }
  212.     /**
  213.      * Get size
  214.      *
  215.      * @return string
  216.      */
  217.     public function getSize() {
  218.         return $this->size;
  219.     }
  220.     /**
  221.      * Set public
  222.      *
  223.      * @param boolean $public
  224.      *
  225.      * @return Doc
  226.      */
  227.     public function setPublic($public) {
  228.         $this->public $public;
  229.         return $this;
  230.     }
  231.     /**
  232.      * Get public
  233.      *
  234.      * @return boolean
  235.      */
  236.     public function getPublic() {
  237.         return $this->public;
  238.     }
  239.     /**
  240.      * Set created
  241.      *
  242.      * @param \DateTime $created
  243.      *
  244.      * @return Doc
  245.      */
  246.     public function setCreated($created) {
  247.         $this->created $created;
  248.         return $this;
  249.     }
  250.     /**
  251.      * Get created
  252.      *
  253.      * @return \DateTime
  254.      */
  255.     public function getCreated() {
  256.         return $this->created;
  257.     }
  258.     /**
  259.      * Set edited
  260.      *
  261.      * @param \DateTime $edited
  262.      *
  263.      * @return Doc
  264.      */
  265.     public function setEdited($edited) {
  266.         $this->edited $edited;
  267.         return $this;
  268.     }
  269.     /**
  270.      * Get edited
  271.      *
  272.      * @return \DateTime
  273.      */
  274.     public function getEdited() {
  275.         return $this->edited;
  276.     }
  277.     /**
  278.      * Set notice
  279.      *
  280.      * @param \App\Entity\Notice $notice
  281.      *
  282.      * @return Doc
  283.      */
  284.     public function setNotice(Notice $notice null) {
  285.         $this->notice $notice;
  286.         return $this;
  287.     }
  288.     /**
  289.      * Get notice
  290.      *
  291.      * @return \App\Entity\Notice
  292.      */
  293.     public function getNotice() {
  294.         return $this->notice;
  295.     }
  296.     /**
  297.      * Set skoda
  298.      *
  299.      * @param \App\Entity\Skoda $skoda
  300.      *
  301.      * @return Doc
  302.      */
  303.     public function setSkoda(Skoda $skoda null) {
  304.         $this->skoda $skoda;
  305.         return $this;
  306.     }
  307.     /**
  308.      * Get skoda
  309.      *
  310.      * @return \App\Entity\Skoda
  311.      */
  312.     public function getSkoda() {
  313.         return $this->skoda;
  314.     }
  315.     /**
  316.      * Set opatrenie
  317.      *
  318.      * @param \App\Entity\Opatrenie $opatrenie
  319.      *
  320.      * @return Doc
  321.      */
  322.     public function setOpatrenie(Opatrenie $opatrenie null) {
  323.         $this->opatrenie $opatrenie;
  324.         return $this;
  325.     }
  326.     /**
  327.      * Get opatrenie
  328.      *
  329.      * @return \App\Entity\Opatrenie
  330.      */
  331.     public function getOpatrenie() {
  332.         return $this->opatrenie;
  333.     }
  334.     /**
  335.      * Set spk
  336.      *
  337.      * @param \App\Entity\SpravneKonanie $spk
  338.      *
  339.      * @return Doc
  340.      */
  341.     public function setSpk(SpravneKonanie $spk null) {
  342.         $this->spk $spk;
  343.         return $this;
  344.     }
  345.     /**
  346.      * Get spk
  347.      *
  348.      * @return \App\Entity\SpravneKonanie
  349.      */
  350.     public function getSpk() {
  351.         return $this->spk;
  352.     }
  353.     /**
  354.      * Set suk
  355.      *
  356.      * @param \App\Entity\SudneKonanie $suk
  357.      *
  358.      * @return Doc
  359.      */
  360.     public function setSuk(SudneKonanie $suk null) {
  361.         $this->suk $suk;
  362.         return $this;
  363.     }
  364.     /**
  365.      * Get suk
  366.      *
  367.      * @return \App\Entity\SudneKonanie
  368.      */
  369.     public function getSuk() {
  370.         return $this->suk;
  371.     }
  372.     /**
  373.      * Set url
  374.      *
  375.      * @param string $url
  376.      *
  377.      * @return Doc
  378.      */
  379.     public function setUrl($url) {
  380.         $this->url $url;
  381.         return $this;
  382.     }
  383.     /**
  384.      * Get url
  385.      *
  386.      * @return string
  387.      */
  388.     public function getUrl() {
  389.         return $this->url;
  390.     }
  391. }