src/Entity/Astuce.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\AstuceRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Uid\Uuid;
  6. /**
  7.  * @ORM\Entity(repositoryClass=AstuceRepository::class)
  8.  */
  9. class Astuce
  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="string", length=255, nullable=true)
  27.      */
  28.     private $slug;
  29.     /**
  30.      * @ORM\Column(type="boolean", nullable=true)
  31.      */
  32.     private $statut false;
  33.     /**
  34.      * @ORM\Column(type="datetime_immutable", nullable=true)
  35.      */
  36.     private $createdAt;
  37.     /**
  38.      * @ORM\Column(type="datetime", nullable=true)
  39.      */
  40.     private $updatedAt;
  41.     /**
  42.      * @ORM\Column(type="string", length=255, nullable=true)
  43.      */
  44.     private $titre;
  45.     /**
  46.      * @ORM\Column(type="text", nullable=true)
  47.      */
  48.     private $description;
  49.     /**
  50.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="astuces")
  51.      */
  52.     private $user;
  53.     /**
  54.      * @ORM\Column(type="string", length=255, nullable=true)
  55.      */
  56.     private $fichier;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      */
  60.     private $ext;
  61.     /**
  62.      * @ORM\Column(type="boolean", nullable=true)
  63.      */
  64.     private $moderate false;
  65.     /**
  66.      * @ORM\Column(type="string", length=255, nullable=true)
  67.      */
  68.     private $mime;
  69.     public function __construct()
  70.     {
  71.         $this->uuid Uuid::v4();
  72.     }
  73.     public function getId(): ?int
  74.     {
  75.         return $this->id;
  76.     }
  77.     public function getUuid(): ?string
  78.     {
  79.         return $this->uuid;
  80.     }
  81.     public function setUuid(?string $uuid): self
  82.     {
  83.         $this->uuid $uuid;
  84.         return $this;
  85.     }
  86.     public function getToken(): ?string
  87.     {
  88.         return $this->token;
  89.     }
  90.     public function setToken(?string $token): self
  91.     {
  92.         $this->token $token;
  93.         return $this;
  94.     }
  95.     public function getSlug(): ?string
  96.     {
  97.         return $this->slug;
  98.     }
  99.     public function setSlug(?string $slug): self
  100.     {
  101.         $this->slug $slug;
  102.         return $this;
  103.     }
  104.     public function isStatut(): ?bool
  105.     {
  106.         return $this->statut;
  107.     }
  108.     public function setStatut(?bool $statut): self
  109.     {
  110.         $this->statut $statut;
  111.         return $this;
  112.     }
  113.     public function getCreatedAt(): ?\DateTimeImmutable
  114.     {
  115.         return $this->createdAt;
  116.     }
  117.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  118.     {
  119.         $this->createdAt $createdAt;
  120.         return $this;
  121.     }
  122.     public function getUpdatedAt(): ?\DateTimeInterface
  123.     {
  124.         return $this->updatedAt;
  125.     }
  126.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  127.     {
  128.         $this->updatedAt $updatedAt;
  129.         return $this;
  130.     }
  131.     public function getTitre(): ?string
  132.     {
  133.         return $this->titre;
  134.     }
  135.     public function setTitre(?string $titre): self
  136.     {
  137.         $this->titre $titre;
  138.         return $this;
  139.     }
  140.     public function getDescription(): ?string
  141.     {
  142.         return $this->description;
  143.     }
  144.     public function setDescription(?string $description): self
  145.     {
  146.         $this->description $description;
  147.         return $this;
  148.     }
  149.     public function getUser(): ?User
  150.     {
  151.         return $this->user;
  152.     }
  153.     public function setUser(?User $user): self
  154.     {
  155.         $this->user $user;
  156.         return $this;
  157.     }
  158.     public function getFichier(): ?string
  159.     {
  160.         return $this->fichier;
  161.     }
  162.     public function setFichier(?string $fichier): self
  163.     {
  164.         $this->fichier $fichier;
  165.         return $this;
  166.     }
  167.     public function getExt(): ?string
  168.     {
  169.         return $this->ext;
  170.     }
  171.     public function setExt(?string $ext): self
  172.     {
  173.         $this->ext $ext;
  174.         return $this;
  175.     }
  176.     public function isModerate(): ?bool
  177.     {
  178.         return $this->moderate;
  179.     }
  180.     public function setModerate(?bool $moderate): self
  181.     {
  182.         $this->moderate $moderate;
  183.         return $this;
  184.     }
  185.     public function getMime(): ?string
  186.     {
  187.         return $this->mime;
  188.     }
  189.     public function setMime(?string $mime): self
  190.     {
  191.         $this->mime $mime;
  192.         return $this;
  193.     }
  194. }