Created
July 11, 2012 13:30
-
-
Save enricostano/3090392 to your computer and use it in GitHub Desktop.
Gara Entity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace StanoSas\Bundle\DocumentBundle\Entity; | |
use Doctrine\ORM\Mapping as ORM; | |
use Symfony\Component\Validator\Constraints as Assert; | |
use Gedmo\Mapping\Annotation as Gedmo; | |
use Doctrine\Common\Collections\ArrayCollection; | |
use StanoSas\Bundle\UserBundle\Entity\User; | |
use Vich\UploaderBundle\Mapping\Annotation as Vich; | |
/** | |
* StanoSas\Bundle\DocumentBundle\Entity\Gara | |
* | |
* @ORM\Table() | |
* @ORM\Entity | |
* @ORM\HasLifecycleCallbacks | |
* | |
* @Vich\Uploadable | |
*/ | |
class Gara //extends DocumentInterface | |
{ | |
/** | |
* @var integer $id | |
* | |
* @ORM\Column(name="id", type="integer") | |
* @ORM\Id | |
* @ORM\GeneratedValue(strategy="AUTO") | |
*/ | |
private $id; | |
/** | |
* @var datetime $created | |
* | |
* @ORM\Column(name="created", type="datetime") | |
* @Gedmo\Timestampable(on="create") | |
*/ | |
private $created; | |
/** | |
* @var datetime $updated | |
* | |
* @ORM\Column(name="updated", type="datetime") | |
* @Gedmo\Timestampable(on="update") | |
*/ | |
private $updated; | |
/** | |
* @var date $start | |
* | |
* @ORM\Column(name="start", type="date") | |
*/ | |
private $start; | |
/** | |
* @var date $stop | |
* | |
* @ORM\Column(name="stop", type="date") | |
*/ | |
private $stop; | |
/** | |
* @var string $name | |
* | |
* @ORM\Column(name="name", type="string", length=255) | |
* @Assert\NotBlank | |
*/ | |
private $name; | |
/** | |
* @ORM\ManyToOne(targetEntity="StanoSas\Bundle\UserBundle\Entity\User") | |
* @ORM\JoinColumn(name="author_id", referencedColumnName="id") | |
*/ | |
private $author; | |
/** | |
* @ORM\ManyToOne(targetEntity="Ente") | |
* @ORM\JoinColumn(name="ente_id", referencedColumnName="id") | |
*/ | |
private $ente; | |
/** | |
* @Assert\File( | |
* maxSize="10M", | |
* mimeTypes={"application/pdf", "application/x-pdf"} | |
* ) | |
* @Vich\UploadableField(mapping="gara_file", fileNameProperty="fileName") | |
* | |
* @var File $attachment | |
*/ | |
protected $attachment; | |
/** | |
* @ORM\Column(type="string", length=255, name="filename") | |
* | |
* @var string $fileName | |
*/ | |
protected $fileName; | |
public function __construct() | |
{ | |
} | |
/** | |
* Get id | |
* | |
* @return integer | |
*/ | |
public function getId() | |
{ | |
return $this->id; | |
} | |
/** | |
* Set created | |
* | |
* @param datetime $created | |
*/ | |
public function setCreated($created) | |
{ | |
$this->created = $created; | |
} | |
/** | |
* Get created | |
* | |
* @return datetime | |
*/ | |
public function getCreated() | |
{ | |
return $this->created; | |
} | |
/** | |
* Set updated | |
* | |
* @param datetime $updated | |
*/ | |
public function setUpdated($updated) | |
{ | |
$this->updated = $updated; | |
} | |
/** | |
* Get updated | |
* | |
* @return datetime | |
*/ | |
public function getUpdated() | |
{ | |
return $this->updated; | |
} | |
/** | |
* Set start | |
* | |
* @param date $start | |
*/ | |
public function setStart($start) | |
{ | |
$this->start = $start; | |
} | |
/** | |
* Get start | |
* | |
* @return date | |
*/ | |
public function getStart() | |
{ | |
return $this->start; | |
} | |
/** | |
* Set stop | |
* | |
* @param date $stop | |
*/ | |
public function setStop($stop) | |
{ | |
$this->stop = $stop; | |
} | |
/** | |
* Get stop | |
* | |
* @return date | |
*/ | |
public function getStop() | |
{ | |
return $this->stop; | |
} | |
/** | |
* Set name | |
* | |
* @param string $name | |
*/ | |
public function setName($name) | |
{ | |
$this->name = $name; | |
} | |
/** | |
* Get name | |
* | |
* @return string | |
*/ | |
public function getName() | |
{ | |
return $this->name; | |
} | |
/** | |
* Set author | |
* | |
* @param StanoSas\Bundle\UserBundle\Entity\User $author | |
*/ | |
public function setAuthor(\StanoSas\Bundle\UserBundle\Entity\User $author) | |
{ | |
$this->author = $author; | |
} | |
/** | |
* Get author | |
* | |
* @return StanoSas\Bundle\UserBundle\Entity\User | |
*/ | |
public function getAuthor() | |
{ | |
return $this->author; | |
} | |
/** | |
* Set ente | |
* | |
* @param StanoSas\Bundle\DocumentBundle\Entity\Ente $ente | |
*/ | |
public function setEnte(\StanoSas\Bundle\DocumentBundle\Entity\Ente $ente) | |
{ | |
$this->ente = $ente; | |
} | |
/** | |
* Get ente | |
* | |
* @return StanoSas\Bundle\DocumentBundle\Entity\Ente | |
*/ | |
public function getEnte() | |
{ | |
return $this->ente; | |
} | |
/** | |
* Set fileName | |
* | |
* @param string $fileName | |
*/ | |
public function setFileName($fileName) | |
{ | |
$this->fileName = $fileName; | |
} | |
/** | |
* Get fileName | |
* | |
* @return string | |
*/ | |
public function getFileName() | |
{ | |
return $this->fileName; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment