src/Entity/AdPin.php line 16

Open in your IDE?
  1. <?php
  2. //Note: This entity should not exist. The ad_pin table should just be a join table, but making it this way for now due to the way the mega menu is set up.
  3. namespace App\Entity;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. use Doctrine\Common\Collections\Criteria;
  9. /**
  10.  * @ORM\Entity(repositoryClass="App\Repository\AdPinRepository")
  11.  */
  12. class AdPin
  13. {
  14.     /**
  15.      * @ORM\Id()
  16.      * @ORM\GeneratedValue()
  17.      * @ORM\Column(type="bigint")
  18.      */
  19.     private $id;
  20.     /**
  21.      * @ORM\ManyToOne(targetEntity="App\Entity\MediaGroupItem", inversedBy="pins", cascade={"persist"})
  22.      * @ORM\JoinColumn(name="media_group_item_id", referencedColumnName="id", onDelete="CASCADE")
  23.      */
  24.     private $media_group_item;
  25.     /**
  26.      * @ORM\Column(type="string", length=150)
  27.      */
  28.     private $mega_menu_uuid;
  29.     /**
  30.      * @ORM\Column(type="integer", length=11)
  31.      */
  32.     private $site_id;
  33.     /**
  34.      * @ORM\Column(type="string", length=255)
  35.      */
  36.     private $ad_type;
  37.     
  38.     
  39.     public function __construct ()
  40.     {
  41.         $this->site_id 0;
  42.         $this->mega_menu_uuid "";
  43.         $this->ad_type "";
  44.     }
  45.     public function getMediaGroupItem(): ?MediaGroupItem
  46.     {
  47.         return $this->media_group_item;
  48.     }
  49.     public function setMediaGroupItem(?MediaGroupItem $item): self
  50.     {
  51.         $this->media_group_item $item;
  52.         return $this;
  53.     }
  54.     public function getMegaMenuUuid(): string
  55.     {
  56.         return $this->mega_menu_uuid;
  57.     }
  58.     public function setMegaMenuUuid(string $mega_menu_uuid null): self
  59.     {
  60.         $this->mega_menu_uuid $mega_menu_uuid $mega_menu_uuid "";
  61.         return $this;
  62.     }
  63.     
  64.     public function getSiteId(): int
  65.     {
  66.         return $this->site_id;
  67.     }
  68.     public function setSiteId(int $site_id): self
  69.     {
  70.         $this->site_id $site_id;
  71.         return $this;
  72.     }
  73.     public function getAdType(): string
  74.     {
  75.         return $this->ad_type;
  76.     }
  77.     public function setAdType(string $ad_type null): self
  78.     {
  79.         $this->ad_type $ad_type $ad_type "";
  80.         return $this;
  81.     }
  82.     
  83. }