<?php
namespace App\Entity;
use App\Entity\Notice;
use App\Entity\Skoda;
use App\Entity\Opatrenie;
use App\Entity\SpravneKonanie;
use App\Entity\SudneKonanie;
use Doctrine\ORM\Mapping as ORM;
//use App\Services\FileManager;
/**
* Document
*
* @ORM\Table(name="es_doc")
* @ORM\Entity()
* @ORM\HasLifecycleCallbacks()
*/
class Doc {
/**
* @var int
*
* @ORM\Column(name="id", type="integer")
* @ORM\Id
* @ORM\GeneratedValue(strategy="AUTO")
*/
private $id;
/**
* @var string
*
* @ORM\Column(name="d_name", type="string", length=255, nullable=true)
*/
private $name;
/**
* @var string
*
* @ORM\Column(name="full_name", type="string", length=255, nullable=true)
*/
private $fullName;
/**
* @var string
*
* @ORM\Column(name="popis", type="string", length=255, nullable=true)
*/
private $popis;
/**
* @var string
*
* @ORM\Column(name="d_type", type="string", length=255, nullable=true)
*/
private $type;
/**
* @var string
*
* @ORM\Column(name="d_size", type="string", length=255, nullable=true)
*/
private $size;
/**
* @var string
*
* @ORM\Column(name="d_url", type="string", length=255, nullable=true)
*/
private $url;
/**
* @ORM\Column(name="d_public", type="boolean")
*/
protected $public = false;
/**
* Many Documents have one (the same) Podnet
* @ORM\ManyToOne(targetEntity="Notice", inversedBy="docs")
* @ORM\JoinColumn(name="notice_id", referencedColumnName="id")
*/
private $notice;
/**
* Many Documents have one (the same) Skoda
* @ORM\ManyToOne(targetEntity="Skoda", inversedBy="docs")
* @ORM\JoinColumn(name="skoda_id", referencedColumnName="id")
*/
private $skoda;
/**
* Many Documents have one (the same) opa
* @ORM\ManyToOne(targetEntity="Opatrenie", inversedBy="docs")
* @ORM\JoinColumn(name="opa_id", referencedColumnName="id")
*/
private $opatrenie;
/**
* Many Documents have one (the same) spk
* @ORM\ManyToOne(targetEntity="SpravneKonanie", inversedBy="docs")
* @ORM\JoinColumn(name="spk_id", referencedColumnName="id")
*/
private $spk;
/**
* Many Documents have one (the same) suk
* @ORM\ManyToOne(targetEntity="SudneKonanie", inversedBy="docs")
* @ORM\JoinColumn(name="suk_id", referencedColumnName="id")
*/
private $suk;
/**
* @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');
}
/**
* Get id
*
* @return integer
*/
public function getId() {
return $this->id;
}
/**
* Set name
*
* @param string $name
*
* @return Doc
*/
public function setName($name) {
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName() {
return $this->name;
}
/**
* Set fullName
*
* @param string $fullName
*
* @return Doc
*/
public function setFullName($fullName) {
$this->fullName = $fullName;
return $this;
}
/**
* Get fullName
*
* @return string
*/
public function getFullName() {
return $this->fullName;
}
/**
* Set popis
*
* @param string $popis
*
* @return Doc
*/
public function setPopis($popis) {
$this->popis = $popis;
return $this;
}
/**
* Get popis
*
* @return string
*/
public function getPopis() {
return $this->popis;
}
/**
* Set type
*
* @param string $type
*
* @return Doc
*/
public function setType($type) {
$this->type = $type;
return $this;
}
/**
* Get type
*
* @return string
*/
public function getType() {
return $this->type;
}
/**
* Set size
*
* @param string $size
*
* @return Doc
*/
public function setSize($size) {
$this->size = $size;
return $this;
}
/**
* Get size
*
* @return string
*/
public function getSize() {
return $this->size;
}
/**
* Set public
*
* @param boolean $public
*
* @return Doc
*/
public function setPublic($public) {
$this->public = $public;
return $this;
}
/**
* Get public
*
* @return boolean
*/
public function getPublic() {
return $this->public;
}
/**
* Set created
*
* @param \DateTime $created
*
* @return Doc
*/
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 Doc
*/
public function setEdited($edited) {
$this->edited = $edited;
return $this;
}
/**
* Get edited
*
* @return \DateTime
*/
public function getEdited() {
return $this->edited;
}
/**
* Set notice
*
* @param \App\Entity\Notice $notice
*
* @return Doc
*/
public function setNotice(Notice $notice = null) {
$this->notice = $notice;
return $this;
}
/**
* Get notice
*
* @return \App\Entity\Notice
*/
public function getNotice() {
return $this->notice;
}
/**
* Set skoda
*
* @param \App\Entity\Skoda $skoda
*
* @return Doc
*/
public function setSkoda(Skoda $skoda = null) {
$this->skoda = $skoda;
return $this;
}
/**
* Get skoda
*
* @return \App\Entity\Skoda
*/
public function getSkoda() {
return $this->skoda;
}
/**
* Set opatrenie
*
* @param \App\Entity\Opatrenie $opatrenie
*
* @return Doc
*/
public function setOpatrenie(Opatrenie $opatrenie = null) {
$this->opatrenie = $opatrenie;
return $this;
}
/**
* Get opatrenie
*
* @return \App\Entity\Opatrenie
*/
public function getOpatrenie() {
return $this->opatrenie;
}
/**
* Set spk
*
* @param \App\Entity\SpravneKonanie $spk
*
* @return Doc
*/
public function setSpk(SpravneKonanie $spk = null) {
$this->spk = $spk;
return $this;
}
/**
* Get spk
*
* @return \App\Entity\SpravneKonanie
*/
public function getSpk() {
return $this->spk;
}
/**
* Set suk
*
* @param \App\Entity\SudneKonanie $suk
*
* @return Doc
*/
public function setSuk(SudneKonanie $suk = null) {
$this->suk = $suk;
return $this;
}
/**
* Get suk
*
* @return \App\Entity\SudneKonanie
*/
public function getSuk() {
return $this->suk;
}
/**
* Set url
*
* @param string $url
*
* @return Doc
*/
public function setUrl($url) {
$this->url = $url;
return $this;
}
/**
* Get url
*
* @return string
*/
public function getUrl() {
return $this->url;
}
}