src/Entity/FichierPost.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FichierPostRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Uid\Uuid;
  6. /**
  7.  * @ORM\Entity(repositoryClass=FichierPostRepository::class)
  8.  */
  9. class FichierPost
  10. {
  11.     /**
  12.      * @ORM\Id
  13.      * @ORM\GeneratedValue
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\Column(type="string", length=255, nullable=true)
  19.      */
  20.     private $uuid;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $token;
  25.     /**
  26.      * @ORM\Column(type="boolean", nullable=true)
  27.      */
  28.     private $statut false;
  29.     /**
  30.      * @ORM\Column(type="datetime_immutable", nullable=true)
  31.      */
  32.     private $createdAt;
  33.     /**
  34.      * @ORM\Column(type="datetime", nullable=true)
  35.      */
  36.     private $updatedAt;
  37.     /**
  38.      * @ORM\Column(type="string", length=255, nullable=true)
  39.      */
  40.     private $fichier;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $ext;
  45.     
  46.     /**
  47.      * @ORM\Column(type="string", length=255, nullable=true)
  48.      */
  49.     private $mime;
  50.     /**
  51.      * @ORM\ManyToOne(targetEntity=Post::class, inversedBy="fichierPosts")
  52.      */
  53.     private $post;
  54.     public function __construct()
  55.     {
  56.         $this->uuid Uuid::v4();
  57.     }
  58.     public function getId(): ?int
  59.     {
  60.         return $this->id;
  61.     }
  62.     public function getUuid(): ?string
  63.     {
  64.         return $this->uuid;
  65.     }
  66.     public function setUuid(?string $uuid): self
  67.     {
  68.         $this->uuid $uuid;
  69.         return $this;
  70.     }
  71.     public function getToken(): ?string
  72.     {
  73.         return $this->token;
  74.     }
  75.     public function setToken(?string $token): self
  76.     {
  77.         $this->token $token;
  78.         return $this;
  79.     }
  80.     public function isStatut(): ?bool
  81.     {
  82.         return $this->statut;
  83.     }
  84.     public function setStatut(?bool $statut): self
  85.     {
  86.         $this->statut $statut;
  87.         return $this;
  88.     }
  89.     public function getCreatedAt(): ?\DateTimeImmutable
  90.     {
  91.         return $this->createdAt;
  92.     }
  93.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  94.     {
  95.         $this->createdAt $createdAt;
  96.         return $this;
  97.     }
  98.     public function getUpdatedAt(): ?\DateTimeInterface
  99.     {
  100.         return $this->updatedAt;
  101.     }
  102.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  103.     {
  104.         $this->updatedAt $updatedAt;
  105.         return $this;
  106.     }
  107.     public function getFichier(): ?string
  108.     {
  109.         return $this->fichier;
  110.     }
  111.     public function setFichier(?string $fichier): self
  112.     {
  113.         $this->fichier $fichier;
  114.         return $this;
  115.     }
  116.     public function getExt(): ?string
  117.     {
  118.         return $this->ext;
  119.     }
  120.     public function setExt(?string $ext): self
  121.     {
  122.         $this->ext $ext;
  123.         return $this;
  124.     }
  125.     public function getMime(): ?string
  126.     {
  127.         return $this->mime;
  128.     }
  129.     public function setMime(?string $mime): self
  130.     {
  131.         $this->mime $mime;
  132.         return $this;
  133.     }
  134.     public function getPost(): ?Post
  135.     {
  136.         return $this->post;
  137.     }
  138.     public function setPost(?Post $post): self
  139.     {
  140.         $this->post $post;
  141.         return $this;
  142.     }
  143. }