src\Entity\Publicite.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Symfony\Component\Validator\Constraints as Assert;
  5. use Symfony\Component\HttpFoundation\File\File;
  6. #[ORM\Entity(repositoryClass\App\Repository\PubliciteRepository::class)]
  7. class Publicite
  8. {
  9.     #[ORM\Id]
  10.     #[ORM\GeneratedValue]
  11.     #[ORM\Column(type'integer')]
  12.     private $id;
  13.     #[ORM\Column(type'string'length255)]
  14.     private $libelle;
  15.     #[ORM\Column(type'text'nullabletrue)]
  16.     private $description;
  17.     #[ORM\Column(type'date')]
  18.     private $debut;
  19.     #[ORM\Column(type'date'nullabletrue)]
  20.     private $fin;
  21.     #[ORM\Column(type'string'length255nullabletrue)]
  22.     private $support;
  23.     #[ORM\Column(type'string'length255nullabletrue)]
  24.     private $espace;
  25.     #[ORM\Column(type'boolean')]
  26.     private $status;
  27.     #[ORM\Column(type'datetime')]
  28.     private $create_at;
  29.     #[ORM\Column(type'datetime'nullabletrue)]
  30.     private $update_at;
  31.     #[ORM\ManyToOne(targetEntity\App\Entity\TypePub::class, inversedBy'publicite')]
  32.     private $type;
  33.     const espaces = ['Header','Pub','body'],
  34.         espaces_long =['EntĂȘte','Pub','Corps'];
  35.     function __construct()
  36.     {
  37.         $this->status=false;
  38.         //$this->roles = ['ROLE_USER'];
  39.         $this->create_at=new \DateTime('UTC');
  40.         //$this->loginattemps = new ArrayCollection();
  41.         //$this->trackings = new ArrayCollection();
  42.     }
  43.     public function getId(): ?int
  44.     {
  45.         return $this->id;
  46.     }
  47.     public function getLibelle(): ?string
  48.     {
  49.         return $this->libelle;
  50.     }
  51.     public function setLibelle(string $libelle): self
  52.     {
  53.         $this->libelle $libelle;
  54.         return $this;
  55.     }
  56.     public function getDescription(): ?string
  57.     {
  58.         return $this->description;
  59.     }
  60.     public function setDescription(?string $description): self
  61.     {
  62.         $this->description $description;
  63.         return $this;
  64.     }
  65.     public function getDebut(): ?\DateTimeInterface
  66.     {
  67.         return $this->debut;
  68.     }
  69.     public function setDebut(\DateTimeInterface $debut): self
  70.     {
  71.         $this->debut $debut;
  72.         return $this;
  73.     }
  74.     public function getFin(): ?\DateTimeInterface
  75.     {
  76.         return $this->fin;
  77.     }
  78.     public function setFin(?\DateTimeInterface $fin): self
  79.     {
  80.         $this->fin $fin;
  81.         return $this;
  82.     }
  83.     public function getSupport()
  84.     {
  85.         return $this->support;
  86.     }
  87.     public function setSupport($support)
  88.     {
  89.         $this->support $support;
  90.         return $this;
  91.     }
  92.     public function getEspace(): ?string
  93.     {
  94.         return $this->espace;
  95.     }
  96.      public function getFullEspace(): ?string
  97.     {
  98.         return self::espaces[$this->espace];
  99.     }
  100.     public function getFullEspaceLong(): ?string
  101.     {
  102.         return self::espaces_long[$this->espace];
  103.     }
  104.     public function setEspace(?string $espace): self
  105.     {
  106.         $this->espace $espace;
  107.         return $this;
  108.     }
  109.     public function getStatus(): ?bool
  110.     {
  111.         return $this->status;
  112.     }
  113.     public function setStatus(bool $status): self
  114.     {
  115.         $this->status $status;
  116.         return $this;
  117.     }
  118.     public function getCreateAt(): ?\DateTimeInterface
  119.     {
  120.         return $this->create_at;
  121.     }
  122.     public function setCreateAt(\DateTimeInterface $create_at): self
  123.     {
  124.         $this->create_at $create_at;
  125.         return $this;
  126.     }
  127.     public function getUpdateAt(): ?\DateTimeInterface
  128.     {
  129.         return $this->update_at;
  130.     }
  131.     public function setUpdateAt(?\DateTimeInterface $update_at): self
  132.     {
  133.         $this->update_at $update_at;
  134.         return $this;
  135.     }
  136.     public function getType(): ?TypePub
  137.     {
  138.         return $this->type;
  139.     }
  140.     public function setType(?TypePub $type): self
  141.     {
  142.         $this->type $type;
  143.         return $this;
  144.     }
  145. }