src/Entity/Application.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. /**
  8.  * @ORM\Entity(repositoryClass=App\Repository\ApplicationRepository::class)
  9.  * @ORM\Table(name="application", schema="bdnf", options={"comment":"Contient les urls de téléchargement des applications "})
  10.  *
  11.  */
  12. class Application
  13. {
  14.     public function __construct()
  15.     {
  16.     }
  17.     public function __toString()
  18.     {
  19.         return $this->getTitle();
  20.     }
  21.     public function toArray()
  22.     {
  23.         return [
  24.             'title' => $this->getTitle(),
  25.             'lastUpdate' => $this->getLastUpdate()
  26.         ];
  27.     }
  28.     /**
  29.      * @ORM\Id
  30.      * @ORM\GeneratedValue
  31.      * @ORM\Column(type="integer", options={"comment":"Identifiant unique de l'application"})
  32.      */
  33.     private $id;
  34.     /**
  35.      * @ORM\Column(type="string", options={"comment":"Titre de l'application"})
  36.      */
  37.     private $title;
  38.     /**
  39.      * @ORM\Column(type="string" , options={"comment":"Type de l'application"})
  40.      */
  41.     private $type;
  42.     /**
  43.      * @ORM\Column(type="string" , options={"comment":"Lien de téléchargement de l'application"})
  44.      */
  45.     private $downloadLink;
  46.     /**
  47.      * @ORM\Column(type="datetime", nullable=true , options={"comment":"Date de la dernière mise à jour de l'application"})
  48.      */
  49.     private $lastUpdate;
  50.     /**
  51.      * @return mixed
  52.      */
  53.     public function getId()
  54.     {
  55.         return $this->id;
  56.     }
  57.     /**
  58.      * @param mixed $id
  59.      */
  60.     public function setId($id): void
  61.     {
  62.         $this->id $id;
  63.     }
  64.     /**
  65.      * @return mixed
  66.      */
  67.     public function getTitle()
  68.     {
  69.         return $this->title;
  70.     }
  71.     /**
  72.      * @param mixed $title
  73.      */
  74.     public function setTitle($title): void
  75.     {
  76.         $this->title $title;
  77.     }
  78.     /**
  79.      * @return mixed
  80.      */
  81.     public function getLastUpdate()
  82.     {
  83.         return $this->lastUpdate;
  84.     }
  85.     /**
  86.      * @param mixed $lastUpdate
  87.      */
  88.     public function setLastUpdate($lastUpdate): void
  89.     {
  90.         $this->lastUpdate $lastUpdate;
  91.     }
  92.     /**
  93.      * @return mixed
  94.      */
  95.     public function getType()
  96.     {
  97.         return $this->type;
  98.     }
  99.     /**
  100.      * @param mixed $type
  101.      */
  102.     public function setType($type): void
  103.     {
  104.         $this->type $type;
  105.     }
  106.     /**
  107.      * @return mixed
  108.      */
  109.     public function getDownloadLink()
  110.     {
  111.         return $this->downloadLink;
  112.     }
  113.     /**
  114.      * @param mixed $downloadLink
  115.      */
  116.     public function setDownloadLink($downloadLink): void
  117.     {
  118.         $this->downloadLink $downloadLink;
  119.     }
  120. }