src/Entity/AdvertisingBanner.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Bluesquare\StorageBundle\Annotations\Storage;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6.  * @ORM\Entity(repositoryClass="App\Repository\AdvertisingBannerRepository")
  7.  *
  8.  * @ORM\HasLifecycleCallbacks()
  9.  */
  10. class AdvertisingBanner
  11. {
  12.     public function __construct()
  13.     {
  14.     }
  15.     /**
  16.      * @ORM\Id()
  17.      *
  18.      * @ORM\GeneratedValue()
  19.      *
  20.      * @ORM\Column(type="integer")
  21.      */
  22.     private $id;
  23.     /**
  24.      * @ORM\Column(type="string", nullable=true, length=180)
  25.      */
  26.     private $link null;
  27.     /**
  28.      * @ORM\Column(type="text", nullable=true)
  29.      */
  30.     private $html null;
  31.     /**
  32.      * @ORM\Column(type="integer", nullable=false)
  33.      */
  34.     private $clicks 0;
  35.     /**
  36.      * @ORM\Column(type="boolean", nullable=false)
  37.      */
  38.     private $publication_status false;
  39.     /**
  40.      * @ORM\Column(type="string", nullable=true, length=180)
  41.      *
  42.      * @Storage(name="main", mode="public", prefix="advertising")
  43.      */
  44.     private $image null;
  45.     /**
  46.      * @ORM\Column(type="string", nullable=true, length=180)
  47.      *
  48.      * @Storage(name="main", mode="public", prefix="advertising_original")
  49.      */
  50.     private $image_original null;
  51.     /**
  52.      * @ORM\Column(type="string", nullable=true, length=180)
  53.      */
  54.     private $mime_type null;
  55.     /**
  56.      * @ORM\Column(type="string", nullable=true, length=180)
  57.      */
  58.     private $mime_type_original null;
  59.     /**
  60.      * @ORM\Column(type="string", nullable=true, length=180)
  61.      */
  62.     private $image_type null;
  63.     public function getId(): ?int
  64.     {
  65.         return $this->id;
  66.     }
  67.     public function getLink()
  68.     {
  69.         return $this->link;
  70.     }
  71.     public function setLink($link)
  72.     {
  73.         $this->link $link;
  74.         return $this;
  75.     }
  76.     public function getClicks()
  77.     {
  78.         return $this->clicks;
  79.     }
  80.     public function setClicks($clicks)
  81.     {
  82.         $this->clicks $clicks;
  83.         return $this;
  84.     }
  85.     public function getPublicationStatus()
  86.     {
  87.         return $this->publication_status;
  88.     }
  89.     public function setPublicationStatus($publication_status)
  90.     {
  91.         $this->publication_status $publication_status;
  92.         return $this;
  93.     }
  94.     public function getImage()
  95.     {
  96.         return $this->image;
  97.     }
  98.     public function setImage($image)
  99.     {
  100.         $this->image $image;
  101.         return $this;
  102.     }
  103.     public function getMimeType()
  104.     {
  105.         return $this->mime_type;
  106.     }
  107.     public function setMimeType($mime_type)
  108.     {
  109.         $this->mime_type $mime_type;
  110.         return $this;
  111.     }
  112.     public function getHTML()
  113.     {
  114.         return $this->html;
  115.     }
  116.     public function setHTML($html)
  117.     {
  118.         $this->html $html;
  119.         return $this;
  120.     }
  121.     /**
  122.      * @return mixed
  123.      */
  124.     public function getImageType()
  125.     {
  126.         return $this->image_type;
  127.     }
  128.     /**
  129.      * @param mixed $image_type
  130.      *
  131.      * @return AdvertisingBanner
  132.      */
  133.     public function setImageType($image_type)
  134.     {
  135.         $this->image_type $image_type;
  136.         return $this;
  137.     }
  138.     /**
  139.      * @ORM\Column(type="datetime", nullable=false)
  140.      */
  141.     private $created_at;
  142.     /**
  143.      * @ORM\Column(type="datetime", nullable=true)
  144.      */
  145.     private $updated_at null;
  146.     public function getCreatedAt(): \DateTimeInterface
  147.     {
  148.         return $this->created_at;
  149.     }
  150.     public function setCreatedAt(\DateTimeInterface $created_at): self
  151.     {
  152.         $this->created_at $created_at;
  153.         return $this;
  154.     }
  155.     public function getUpdatedAt(): ?\DateTimeInterface
  156.     {
  157.         return $this->updated_at;
  158.     }
  159.     public function setUpdatedAt(?\DateTimeInterface $updated_at): self
  160.     {
  161.         $this->updated_at $updated_at;
  162.         return $this;
  163.     }
  164.     /**
  165.      * @ORM\PrePersist
  166.      */
  167.     public function setCreatedAtValue()
  168.     {
  169.         $this->setCreatedAt(new \DateTime());
  170.     }
  171.     /**
  172.      * @ORM\PreUpdate
  173.      */
  174.     public function setUpdatedAtValue()
  175.     {
  176.         $this->setUpdatedAt(new \DateTime());
  177.     }
  178.     /**
  179.      * @ORM\Column(type="datetime", nullable=true)
  180.      */
  181.     private $deleted_at;
  182.     /**
  183.      * @ORM\ManyToOne(targetEntity="App\Entity\AdvertisingBannerType")
  184.      */
  185.     private $advertising_banner_type;
  186.     /**
  187.      * @ORM\ManyToOne(targetEntity="App\Entity\Newsletter", inversedBy="advertisingBanners")
  188.      */
  189.     private $newsletter;
  190.     /**
  191.      * @ORM\ManyToOne(targetEntity="App\Entity\Advertising", inversedBy="advertisingBanners")
  192.      */
  193.     private $advertising;
  194.     /**
  195.      * @ORM\ManyToOne(targetEntity="App\Entity\Newsletter", inversedBy="advertisingBannerContainers")
  196.      */
  197.     private $target_newsletter;
  198.     public function getDeletedAt(): ?\DateTimeInterface
  199.     {
  200.         return $this->deleted_at;
  201.     }
  202.     public function setDeletedAt(?\DateTimeInterface $deleted_at): self
  203.     {
  204.         $this->deleted_at $deleted_at;
  205.         return $this;
  206.     }
  207.     public function getAdvertisingBannerType(): ?AdvertisingBannerType
  208.     {
  209.         return $this->advertising_banner_type;
  210.     }
  211.     public function setAdvertisingBannerType(?AdvertisingBannerType $advertising_banner_type): self
  212.     {
  213.         $this->advertising_banner_type $advertising_banner_type;
  214.         return $this;
  215.     }
  216.     public function getNewsletter(): ?Newsletter
  217.     {
  218.         return $this->newsletter;
  219.     }
  220.     public function setNewsletter(?Newsletter $newsletter): self
  221.     {
  222.         $this->newsletter $newsletter;
  223.         return $this;
  224.     }
  225.     public function getAdvertising(): ?Advertising
  226.     {
  227.         return $this->advertising;
  228.     }
  229.     public function setAdvertising(?Advertising $advertising): self
  230.     {
  231.         $this->advertising $advertising;
  232.         return $this;
  233.     }
  234.     public function getTargetNewsletter(): ?Newsletter
  235.     {
  236.         return $this->target_newsletter;
  237.     }
  238.     public function setTargetNewsletter(?Newsletter $target_newsletter): self
  239.     {
  240.         $this->target_newsletter $target_newsletter;
  241.         return $this;
  242.     }
  243.     /**
  244.      * @return null
  245.      */
  246.     public function getImageOriginal()
  247.     {
  248.         return $this->image_original;
  249.     }
  250.     /**
  251.      * @param null $image_original
  252.      */
  253.     public function setImageOriginal($image_original): void
  254.     {
  255.         $this->image_original $image_original;
  256.     }
  257.     /**
  258.      * @return null
  259.      */
  260.     public function getMimeTypeOriginal()
  261.     {
  262.         return $this->mime_type_original;
  263.     }
  264.     /**
  265.      * @param null $mime_type_original
  266.      */
  267.     public function setMimeTypeOriginal($mime_type_original): void
  268.     {
  269.         $this->mime_type_original $mime_type_original;
  270.     }
  271.     // Target of a LinkedEntity from AdvertisingBannerController (Controller)
  272. }