src/Entity/Domaine.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\DomaineRepository;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. use Symfony\Component\Uid\Uuid;
  9. /**
  10.  * @ORM\Entity(repositoryClass=DomaineRepository::class)
  11.  * @UniqueEntity(fields={"nom"}, message="Ce domaine existe déjà")
  12.  */
  13. class Domaine
  14. {
  15.     /**
  16.      * @ORM\Id
  17.      * @ORM\GeneratedValue
  18.      * @ORM\Column(type="integer")
  19.      */
  20.     private $id;
  21.     /**
  22.      * @ORM\Column(type="string", length=255, nullable=true)
  23.      */
  24.     private $uuid;
  25.     /**
  26.      * @ORM\Column(type="string", length=255, nullable=true)
  27.      */
  28.     private $token;
  29.     /**
  30.      * @ORM\Column(type="string", length=255, nullable=true)
  31.      */
  32.     private $slug;
  33.     /**
  34.      * @ORM\Column(type="boolean", nullable=true)
  35.      */
  36.     private $statut false;
  37.     /**
  38.      * @ORM\Column(type="datetime_immutable", nullable=true)
  39.      */
  40.     private $createdAt;
  41.     /**
  42.      * @ORM\Column(type="datetime", nullable=true)
  43.      */
  44.     private $updatedAt;
  45.     /**
  46.      * @ORM\Column(type="string", length=255, nullable=true)
  47.      */
  48.     private $nom;
  49.     /**
  50.      * @ORM\Column(type="text", nullable=true)
  51.      */
  52.     private $description;
  53.     /**
  54.      * @ORM\Column(type="integer", nullable=true)
  55.      */
  56.     private $listorder;
  57.     /**
  58.      * @ORM\Column(type="string", length=255, nullable=true)
  59.      */
  60.     private $src;
  61.     /**
  62.      * @ORM\Column(type="text", nullable=true)
  63.      */
  64.     private $alt;
  65.     /**
  66.      * @ORM\Column(type="string", length=255, nullable=true)
  67.      */
  68.     private $title;
  69.     /**
  70.      * @ORM\Column(type="string", length=255, nullable=true)
  71.      */
  72.     private $srcImg;
  73.     /**
  74.      * @ORM\Column(type="text", nullable=true)
  75.      */
  76.     private $altImg;
  77.     /**
  78.      * @ORM\Column(type="string", length=255, nullable=true)
  79.      */
  80.     private $titleImg;
  81.     /**
  82.      * @ORM\Column(type="text", nullable=true)
  83.      */
  84.     private $intro;
  85.     public function __construct()
  86.     {
  87.         $this->uuid Uuid::v4();
  88.   
  89.     }
  90.     public function getId(): ?int
  91.     {
  92.         return $this->id;
  93.     }
  94.     public function getUuid(): ?string
  95.     {
  96.         return $this->uuid;
  97.     }
  98.     public function setUuid(?string $uuid): self
  99.     {
  100.         $this->uuid $uuid;
  101.         return $this;
  102.     }
  103.     public function getToken(): ?string
  104.     {
  105.         return $this->token;
  106.     }
  107.     public function setToken(?string $token): self
  108.     {
  109.         $this->token $token;
  110.         return $this;
  111.     }
  112.     public function getSlug(): ?string
  113.     {
  114.         return $this->slug;
  115.     }
  116.     public function setSlug(?string $slug): self
  117.     {
  118.         $this->slug $slug;
  119.         return $this;
  120.     }
  121.     public function isStatut(): ?bool
  122.     {
  123.         return $this->statut;
  124.     }
  125.     public function setStatut(?bool $statut): self
  126.     {
  127.         $this->statut $statut;
  128.         return $this;
  129.     }
  130.     public function getCreatedAt(): ?\DateTimeImmutable
  131.     {
  132.         return $this->createdAt;
  133.     }
  134.     public function setCreatedAt(?\DateTimeImmutable $createdAt): self
  135.     {
  136.         $this->createdAt $createdAt;
  137.         return $this;
  138.     }
  139.     public function getUpdatedAt(): ?\DateTimeInterface
  140.     {
  141.         return $this->updatedAt;
  142.     }
  143.     public function setUpdatedAt(?\DateTimeInterface $updatedAt): self
  144.     {
  145.         $this->updatedAt $updatedAt;
  146.         return $this;
  147.     }
  148.     public function getNom(): ?string
  149.     {
  150.         return $this->nom;
  151.     }
  152.     public function setNom(?string $nom): self
  153.     {
  154.         $this->nom $nom;
  155.         return $this;
  156.     }
  157.    
  158.     public function getSrc(): ?string
  159.     {
  160.         return $this->src;
  161.     }
  162.     public function setSrc(?string $src): self
  163.     {
  164.         $this->src $src;
  165.         return $this;
  166.     }
  167.     public function getAlt(): ?string
  168.     {
  169.         return $this->alt;
  170.     }
  171.     public function setAlt(?string $alt): self
  172.     {
  173.         $this->alt $alt;
  174.         return $this;
  175.     }
  176.     public function getTitle(): ?string
  177.     {
  178.         return $this->title;
  179.     }
  180.     public function setTitle(?string $title): self
  181.     {
  182.         $this->title $title;
  183.         return $this;
  184.     }
  185.     public function getSrcImg(): ?string
  186.     {
  187.         return $this->srcImg;
  188.     }
  189.     public function setSrcImg(?string $srcImg): self
  190.     {
  191.         $this->srcImg $srcImg;
  192.         return $this;
  193.     }
  194.     public function getAltImg(): ?string
  195.     {
  196.         return $this->altImg;
  197.     }
  198.     public function setAltImg(?string $altImg): self
  199.     {
  200.         $this->altImg $altImg;
  201.         return $this;
  202.     }
  203.     public function getTitleImg(): ?string
  204.     {
  205.         return $this->titleImg;
  206.     }
  207.     public function setTitleImg(?string $titleImg): self
  208.     {
  209.         $this->titleImg $titleImg;
  210.         return $this;
  211.     }
  212.     public function getIntro(): ?string
  213.     {
  214.         return $this->intro;
  215.     }
  216.     public function setIntro(?string $intro): self
  217.     {
  218.         $this->intro $intro;
  219.         return $this;
  220.     }
  221.     public function getDescription(): ?string
  222.     {
  223.         return $this->description;
  224.     }
  225.     public function setDescription(?string $description): self
  226.     {
  227.         $this->description $description;
  228.         return $this;
  229.     }
  230.     public function getListorder(): ?int
  231.     {
  232.         return $this->listorder;
  233.     }
  234.     public function setListorder(?int $listorder): self
  235.     {
  236.         $this->listorder $listorder;
  237.         return $this;
  238.     }
  239. }