src/Entity/Banner.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\BannerRepository;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass=BannerRepository::class)
  7.  */
  8. class Banner
  9. {
  10.     /**
  11.      * @ORM\Id
  12.      * @ORM\GeneratedValue
  13.      * @ORM\Column(type="integer")
  14.      */
  15.     private $id;
  16.     /**
  17.      * @ORM\Column(type="string", length=255)
  18.      */
  19.     private $name;
  20.     /**
  21.      * @ORM\Column(type="string", length=255)
  22.      */
  23.     private $path;
  24.     /**
  25.      * @ORM\ManyToOne(targetEntity=Articles::class, inversedBy="banners")
  26.      */
  27.     private $article;
  28.     /**
  29.      * @ORM\Column(type="boolean")
  30.      */
  31.     private $deleted false;
  32.     /**
  33.      * @ORM\Column(type="datetime")
  34.      */
  35.     private $createdAt;
  36.     /**
  37.      * @ORM\ManyToOne(targetEntity=Users::class, inversedBy="banners")
  38.      */
  39.     private $createdBy;
  40.     /**
  41.      * @ORM\Column(type="integer")
  42.      */
  43.     private $position 0;
  44.     /**
  45.      * @ORM\Column(type="boolean")
  46.      */
  47.     private $visible false;
  48.     /**
  49.      * @ORM\Column(type="string", length=255, nullable=true)
  50.      */
  51.     private $externalLink;
  52.     public function __construct()
  53.     {
  54.         $this->createdAt = new \DateTime();
  55.     }
  56.     public function getId(): ?int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function getName(): ?string
  61.     {
  62.         return $this->name;
  63.     }
  64.     public function setName(string $name): self
  65.     {
  66.         $this->name $name;
  67.         return $this;
  68.     }
  69.     public function getPath(): ?string
  70.     {
  71.         return $this->path;
  72.     }
  73.     public function setPath(string $path): self
  74.     {
  75.         $this->path $path;
  76.         return $this;
  77.     }
  78.     public function getArticle(): ?Articles
  79.     {
  80.         return $this->article;
  81.     }
  82.     public function setArticle(?Articles $article): self
  83.     {
  84.         $this->article $article;
  85.         return $this;
  86.     }
  87.     public function isDeleted(): ?bool
  88.     {
  89.         return $this->deleted;
  90.     }
  91.     public function setDeleted(bool $deleted): self
  92.     {
  93.         $this->deleted $deleted;
  94.         return $this;
  95.     }
  96.     public function getCreatedAt(): ?\DateTimeInterface
  97.     {
  98.         return $this->createdAt;
  99.     }
  100.     public function setCreatedAt(\DateTimeInterface $createdAt): self
  101.     {
  102.         $this->createdAt $createdAt;
  103.         return $this;
  104.     }
  105.     public function getCreatedBy(): ?Users
  106.     {
  107.         return $this->createdBy;
  108.     }
  109.     public function setCreatedBy(?Users $createdBy): self
  110.     {
  111.         $this->createdBy $createdBy;
  112.         return $this;
  113.     }
  114.     public function getPosition(): ?int
  115.     {
  116.         return $this->position;
  117.     }
  118.     public function setPosition(int $position): self
  119.     {
  120.         $this->position $position;
  121.         return $this;
  122.     }
  123.     public function isVisible(): ?bool
  124.     {
  125.         return $this->visible;
  126.     }
  127.     public function setVisible(bool $visible): self
  128.     {
  129.         $this->visible $visible;
  130.         return $this;
  131.     }
  132.     public function getExternalLink(): ?string
  133.     {
  134.         return $this->externalLink;
  135.     }
  136.     public function setExternalLink(?string $externalLink): self
  137.     {
  138.         $this->externalLink $externalLink;
  139.         return $this;
  140.     }
  141. }