src/Uniski/ResourceBundle/Entity/Document.php line 12

Open in your IDE?
  1. <?php
  2. namespace Uniski\ResourceBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5. * @ORM\Entity
  6. * @ORM\Table("document")
  7. * @ORM\HasLifecycleCallbacks()
  8. */
  9. class Document extends BaseUploadEntity {
  10.   const PRIVATE_DOCUMENT 'private_document';
  11.   /**
  12.    * @var integer
  13.    *
  14.    * @ORM\Id
  15.    * @ORM\Column(name="id", type="integer")
  16.    * @ORM\GeneratedValue(strategy="IDENTITY")
  17.    */
  18.   private $id;
  19.   /**
  20.    * @var  string
  21.    * @ORM\Column(name="name", type="string")
  22.    */
  23.   protected $name;
  24.   /**
  25.    * @var  string
  26.    * @ORM\Column(name="description", type="string", nullable=true)
  27.    */
  28.   protected $description;
  29.   /**
  30.    * @var  Uniski\UserBundle\Entity\User
  31.    * @ORM\ManyToOne(targetEntity="Uniski\UserBundle\Entity\User")
  32.    */
  33.   protected $user;
  34.   function __construct()
  35.   {
  36.     $this->type 'document';
  37.   }
  38.   /**
  39.    * Get id
  40.    *
  41.    * @return integer
  42.    */
  43.   public function getId()
  44.   {
  45.       return $this->id;
  46.   }
  47.   /**
  48.    * Set name
  49.    *
  50.    * @param string $name
  51.    *
  52.    * @return Image
  53.    */
  54.   public function setName($name)
  55.   {
  56.       $this->name $name;
  57.       return $this;
  58.   }
  59.   /**
  60.    * Get name
  61.    *
  62.    * @return string
  63.    */
  64.   public function getName()
  65.   {
  66.       return $this->name;
  67.   }
  68.   /**
  69.    * Set description
  70.    *
  71.    * @param string $description
  72.    *
  73.    * @return Image
  74.    */
  75.   public function setDescription($description)
  76.   {
  77.       $this->description $description;
  78.       return $this;
  79.   }
  80.   /**
  81.    * Get description
  82.    *
  83.    * @return string
  84.    */
  85.   public function getDescription()
  86.   {
  87.       return $this->description;
  88.   }
  89.     /**
  90.      * Gets the value of user.
  91.      *
  92.      * @return  Uniski\UserBundle\Entity\User
  93.      */
  94.     public function getUser()
  95.     {
  96.         return $this->user;
  97.     }
  98.     /**
  99.      * Sets the value of user.
  100.      *
  101.      * @param  Uniski\UserBundle\Entity\User $user the user
  102.      *
  103.      * @return self
  104.      */
  105.     public function setUser($user)
  106.     {
  107.         $this->user $user;
  108.         return $this;
  109.     }
  110. }