src/Entity/Gos/GoogleMerchantCategory.php line 15

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. /**
  7.  * GoogleMerchantCategory
  8.  *
  9.  * @ORM\Table(name="google_merchant_category")
  10.  * @ORM\Entity(repositoryClass="App\Repository\GoogleMerchantCategoryRepository")
  11.  */
  12. class GoogleMerchantCategory
  13. {
  14.     /**
  15.      * @var int
  16.      *
  17.      * @ORM\Column(name="id", type="integer")
  18.      * @ORM\Id
  19.      * @ORM\GeneratedValue(strategy="AUTO")
  20.      */
  21.     private $id;
  22.     /**
  23.      * @var int
  24.      *
  25.      * @ORM\Column(name="categoryId", type="integer")
  26.      */
  27.     private $categoryId;
  28.     /**
  29.      * @var string
  30.      *
  31.      * @ORM\Column(name="categoryName", type="string", length=255)
  32.      */
  33.     private $categoryName;
  34.     /**
  35.      * @ORM\OneToMany(targetEntity="App\Entity\Gos\GoogleMerchantFeed", mappedBy="googleMerchantCategory")
  36.      */
  37.     private $googleMerchantFeed;
  38.     public function __toString()
  39.     {
  40.         return (string)$this->categoryName;
  41.     }
  42.     /**
  43.      * Constructor
  44.      */
  45.     public function __construct()
  46.     {
  47.         $this->googleMerchantFeed = new \Doctrine\Common\Collections\ArrayCollection();
  48.     }
  49.     /**
  50.      * Get id
  51.      *
  52.      * @return int
  53.      */
  54.     public function getId()
  55.     {
  56.         return $this->id;
  57.     }
  58.     /**
  59.      * Set categoryId
  60.      *
  61.      * @param integer $categoryId
  62.      *
  63.      * @return GoogleMerchantCategory
  64.      */
  65.     public function setCategoryId($categoryId)
  66.     {
  67.         $this->categoryId $categoryId;
  68.         return $this;
  69.     }
  70.     /**
  71.      * Get categoryId
  72.      *
  73.      * @return int
  74.      */
  75.     public function getCategoryId()
  76.     {
  77.         return $this->categoryId;
  78.     }
  79.     /**
  80.      * Set categoryName
  81.      *
  82.      * @param string $categoryName
  83.      *
  84.      * @return GoogleMerchantCategory
  85.      */
  86.     public function setCategoryName($categoryName)
  87.     {
  88.         $this->categoryName $categoryName;
  89.         return $this;
  90.     }
  91.     /**
  92.      * Get categoryName
  93.      *
  94.      * @return string
  95.      */
  96.     public function getCategoryName()
  97.     {
  98.         return $this->categoryName;
  99.     }
  100.     
  101.     /**
  102.      * Add googleMerchantFeed
  103.      *
  104.      * @param \App\Entity\Gos\GoogleMerchantFeed $googleMerchantFeed
  105.      *
  106.      * @return GoogleMerchantCategory
  107.      */
  108.     public function addGoogleMerchantFeed(\App\Entity\Gos\GoogleMerchantFeed $googleMerchantFeed)
  109.     {
  110.         $this->googleMerchantFeed[] = $googleMerchantFeed;
  111.         return $this;
  112.     }
  113.     /**
  114.      * Remove googleMerchantFeed
  115.      *
  116.      * @param \App\Entity\Gos\GoogleMerchantFeed $googleMerchantFeed
  117.      */
  118.     public function removeGoogleMerchantFeed(\App\Entity\Gos\GoogleMerchantFeed $googleMerchantFeed)
  119.     {
  120.         $this->googleMerchantFeed->removeElement($googleMerchantFeed);
  121.     }
  122.     /**
  123.      * Get googleMerchantFeed
  124.      *
  125.      * @return \Doctrine\Common\Collections\Collection
  126.      */
  127.     public function getGoogleMerchantFeed()
  128.     {
  129.         return $this->googleMerchantFeed;
  130.     }
  131. }