src/AtechNet/CoreBundle/Entity/ProductGroupMember.php line 20

Open in your IDE?
  1. <?php
  2. namespace App\AtechNet\CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\ORM\Mapping\Column;
  5. use Doctrine\ORM\Mapping\Entity;
  6. use Doctrine\ORM\Mapping\HasLifecycleCallbacks;
  7. use Doctrine\ORM\Mapping\JoinColumn;
  8. use Doctrine\ORM\Mapping\ManyToOne;
  9. use Doctrine\ORM\Mapping\Table;
  10. /**
  11.  * ProductGroupMember
  12.  *
  13.  * @Table(name="product_group_member")
  14.  * @Entity
  15.  * @HasLifecycleCallbacks
  16.  */
  17. class ProductGroupMember extends AbstractSignedEntity
  18. {
  19.     /**
  20.      * @var ProductGroup
  21.      *
  22.      * @ManyToOne(targetEntity="ProductGroup", inversedBy="members")
  23.      * @JoinColumn(name="group_id", referencedColumnName="id")
  24.      */
  25.     private $group;
  26.     /**
  27.      * @var Product
  28.      *
  29.      * @ManyToOne(targetEntity="Product")
  30.      * @JoinColumn(name="product_id", referencedColumnName="id")
  31.      */
  32.     private $product;
  33.     /**
  34.      * @var int
  35.      *
  36.      * @Column(name="sort_index", type="integer", nullable=false)
  37.      */
  38.     private $sortIndex;
  39.     /**
  40.      * @var string
  41.      *
  42.      * @Column(name="title", type="string", length=30, nullable=true)
  43.      */
  44.     private string|null $title = null;
  45.     /**
  46.      * @var string
  47.      *
  48.      * @Column(name="description", type="string", length=72, nullable=true)
  49.      */
  50.     private string|null $description = null;
  51.     /**
  52.      * @return ProductGroup
  53.      */
  54.     public function getGroup()
  55.     {
  56.         return $this->group;
  57.     }
  58.     /**
  59.      * @param ProductGroup $group
  60.      */
  61.     public function setGroup($group)
  62.     {
  63.         $this->group = $group;
  64.     }
  65.     /**
  66.      * @return Product
  67.      */
  68.     public function getProduct()
  69.     {
  70.         return $this->product;
  71.     }
  72.     /**
  73.      * @param Product $product
  74.      */
  75.     public function setProduct($product)
  76.     {
  77.         $this->product = $product;
  78.     }
  79.     /**
  80.      * @return int
  81.      */
  82.     public function getSortIndex()
  83.     {
  84.         return $this->sortIndex;
  85.     }
  86.     /**
  87.      * @param int $sortIndex
  88.      */
  89.     public function setSortIndex($sortIndex)
  90.     {
  91.         $this->sortIndex = $sortIndex;
  92.     }
  93.     /**
  94.      * @return string|null
  95.      */
  96.     public function getTitle(): ?string
  97.     {
  98.         return $this->title;
  99.     }
  100.     /**
  101.      * @param string|null $title
  102.      *
  103.      * @return void
  104.      */
  105.     public function setTitle(?string $title): void
  106.     {
  107.         $this->title = $title;
  108.     }
  109.     /**
  110.      * @return string|null
  111.      */
  112.     public function getDescription(): ?string
  113.     {
  114.         return $this->description;
  115.     }
  116.     /**
  117.      * @param string|null $description
  118.      *
  119.      * @return void
  120.      */
  121.     public function setDescription(?string $description): void
  122.     {
  123.         $this->description = $description;
  124.     }
  125. }