src/Entity/Seo/Redirection.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Seo;
  3. use Doctrine\DBAL\Types\Types;
  4. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  5. use Symfony\Component\Validator\Constraints as Assert;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * Redirection
  9.  *
  10.  * @ORM\Table("seo_redirection")
  11.  * @ORM\Entity(repositoryClass="App\Repository\Seo\RedirectionRepository")
  12.  * @ORM\HasLifecycleCallbacks()
  13.  */
  14. class Redirection
  15. {
  16.     /**
  17.      * @var integer
  18.      *
  19.      * @ORM\Column(name="id", type="integer")
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="AUTO")
  22.      */
  23.     protected $id;
  24.     /**
  25.      * @var string
  26.      *
  27.      * @ORM\Column(name="created_at", type="datetime", nullable=true, options={"comment":"Date de création"})
  28.      */
  29.     private $createdAt;
  30.     /**
  31.      * @var string
  32.      *
  33.      * @ORM\Column(name="updated_at", type="datetime", nullable=true, options={"comment":"Date de mise à jour"})
  34.      */
  35.     private $updatedAt;
  36.     /**
  37.      * @var string
  38.      *
  39.      * @ORM\Column(name="title", type="string", length=555, nullable=true)
  40.      */
  41.     private $title;
  42.     /**
  43.      * @var string
  44.      *
  45.      * @ORM\Column(name="slug", type="string", length=555, nullable=true)
  46.      */
  47.     private $slug;
  48.     /**
  49.      * @var string
  50.      *
  51.      * @ORM\Column(name="url", type="string", length=555, nullable=true)
  52.      */
  53.     private $url;
  54.     /**
  55.      * @var string
  56.      *
  57.      * @ORM\Column(name="visibility", type="boolean", nullable=true)
  58.      */
  59.     private $visibility;
  60.     /**
  61.      * @var string
  62.      *
  63.      * @ORM\Column(name="type", type="integer", length=11, nullable=true)
  64.      */
  65.     private $type;
  66.     /**
  67.      * @ORM\PrePersist
  68.      */
  69.     public function setCreatedAtValue(): void
  70.     {
  71.         $this->setCreatedAt(new \DateTime("now"));
  72.         $this->setUpdatedAt(new \DateTime("now"));
  73.     }
  74.     /**
  75.      * @ORM\PreUpdate
  76.      */
  77.     public function setUpdatedAtValue(): void
  78.     {
  79.         $this->setUpdatedAt(new \DateTime("now"));
  80.     }
  81.     public function __toString()
  82.     {
  83.         return $this->title;
  84.     }
  85.     public function getId(): ?int
  86.     {
  87.         return $this->id;
  88.     }
  89.     public function getCreatedAt(): ?\DateTimeInterface
  90.     {
  91.         return $this->createdAt;
  92.     }
  93.     public function setCreatedAt(\DateTimeInterface $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 getTitle(): ?string
  108.     {
  109.         return $this->title;
  110.     }
  111.     public function setTitle(string $title): self
  112.     {
  113.         $this->title $title;
  114.         return $this;
  115.     }
  116.     public function getSlug(): ?string
  117.     {
  118.         return $this->slug;
  119.     }
  120.     public function setSlug(string $slug): self
  121.     {
  122.         $this->slug $slug;
  123.         return $this;
  124.     }
  125.     public function getUrl(): ?string
  126.     {
  127.         return $this->url;
  128.     }
  129.     public function setUrl(string $url): self
  130.     {
  131.         $this->url $url;
  132.         return $this;
  133.     }
  134.     public function getVisibility(): ?bool
  135.     {
  136.         return $this->visibility;
  137.     }
  138.     public function setVisibility(bool $visibility): self
  139.     {
  140.         $this->visibility $visibility;
  141.         return $this;
  142.     }
  143.     public function getType(): ?int
  144.     {
  145.         return $this->type;
  146.     }
  147.     public function setType(int $type): self
  148.     {
  149.         $this->type $type;
  150.         return $this;
  151.     }
  152.     public function isVisibility(): ?bool
  153.     {
  154.         return $this->visibility;
  155.     }
  156. }