src/Entity/Actuv2Podcast.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\Actuv2PodcastRepository;
  5. use Symfony\Component\Validator\Constraints\Date;
  6. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  7. use Symfony\Component\HttpFoundation\File\File;
  8. /**
  9.  * Actuv2Podcast
  10.  *
  11.  * @Vich\Uploadable
  12.  */
  13. #[ORM\Table(name'actuv2_podcast')]
  14. #[ORM\Entity(repositoryClassActuv2PodcastRepository::class)]
  15. class Actuv2Podcast
  16. {
  17.     /**
  18.      * @var int
  19.      *
  20.      */
  21.     #[ORM\Column(name'id'type'bigint'nullablefalse)]
  22.     #[ORM\Id]
  23.     #[ORM\GeneratedValue(strategy'IDENTITY')]
  24.     private $id;
  25.     /**
  26.      * @var \DateTime|null
  27.      *
  28.      */
  29.     #[ORM\Column(name'date'type'date'nullabletrueoptions: ['comment' => 'pĂ©riode'])]
  30.     private $date;
  31.     /**
  32.      * @var string
  33.      *
  34.      */
  35.     #[ORM\Column(name'titre'type'string'length255nullablefalse)]
  36.     private $titre '';
  37.     /**
  38.      * @var string
  39.      *
  40.      */
  41.     #[ORM\Column(name'auteur'type'string'length255nullabletrue)]
  42.     private $auteur '';
  43.     /**
  44.      * @var string
  45.      *
  46.      */
  47.     #[ORM\Column(name'podcast'type'string'length255nullabletrueoptions: ['comment' => 'format mobile portrait'])]
  48.     private $podcast '';
  49.     /**
  50.      * @Vich\UploadableField(mapping="actuv2podcast", fileNameProperty="podcast")
  51.      * @var File|null
  52.      */
  53.     private $tmpPodcast null;
  54.     /**
  55.      * @var string
  56.      *
  57.      */
  58.     #[ORM\Column(name'ausha_url'type'text'nullabletrue)]
  59.     private $ausha_url '';
  60.     #[ORM\Column(type'datetime'nullabletrue)]
  61.     private $updatedAt;
  62.     public function getId(): ?string
  63.     {
  64.         return $this->id;
  65.     }
  66.     public function getDate(): ?\DateTimeInterface
  67.     {
  68.         return $this->date;
  69.     }
  70.     public function setDate(?\DateTimeInterface $date): self
  71.     {
  72.         $this->date $date;
  73.         return $this;
  74.     }
  75.     public function getTitre(): ?string
  76.     {
  77.         return $this->titre;
  78.     }
  79.     public function setTitre(string $titre): self
  80.     {
  81.         $this->titre $titre;
  82.         return $this;
  83.     }
  84.     public function getAuteur(): ?string
  85.     {
  86.         return $this->auteur;
  87.     }
  88.     public function setAuteur(string $auteur): self
  89.     {
  90.         $this->auteur $auteur;
  91.         return $this;
  92.     }
  93.     public function getPodcast(): ?string
  94.     {
  95.         return $this->podcast;
  96.     }
  97.     public function setPodcast(?string $podcast): self
  98.     {
  99.         $this->podcast is_null($podcast) ? "" $podcast;
  100.         return $this;
  101.     }
  102.     public function setTmpPodcast(?File $tmpPodcast null): void
  103.     {
  104.         $this->tmpPodcast $tmpPodcast;
  105.         $this->updatedAt = new \DateTime('now');
  106.     }
  107.     public function getTmpPodcast(): ?File
  108.     {
  109.         return $this->tmpPodcast;
  110.     }
  111.     public function getAushaUrl(): ?string
  112.     {
  113.         return $this->ausha_url;
  114.     }
  115.     public function getausha_url(): ?string
  116.     {
  117.         return $this->ausha_url;
  118.     }
  119.     public function setAushaUrl(string $ausha_url): self
  120.     {
  121.         $this->ausha_url $ausha_url;
  122.         return $this;
  123.     }
  124.     public function getUpdatedAt(): ?\DateTimeInterface
  125.     {
  126.         return $this->updatedAt;
  127.     }
  128.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  129.     {
  130.         $this->updatedAt $updatedAt;
  131.         return $this;
  132.     }
  133. }