modules/QSL/Make/src/Model/Level4Product.php line 21

Open in your IDE?
  1. <?php
  2. /**
  3.  * Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
  4.  * See https://www.x-cart.com/license-agreement.html for license details.
  5.  */
  6. namespace QSL\Make\Model;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * Level4 to product relation
  10.  *
  11.  * @ORM\Entity
  12.  * @ORM\Table (name="level4_product",
  13.  *      uniqueConstraints={
  14.  *          @ORM\UniqueConstraint (name="pair", columns={"productId","level4Id"})
  15.  *      },
  16.  *      indexes={
  17.  *          @ORM\Index (name="position", columns={"position"}),
  18.  *          @ORM\Index (name="level4Id", columns={"level4Id"}),
  19.  *          @ORM\Index (name="productId", columns={"productId"}),
  20.  *          @ORM\Index (name="pair", columns={"productId","level4Id"})
  21.  *      }
  22.  * )
  23.  */
  24. class Level4Product extends ALevelProduct
  25. {
  26.     /**
  27.      * Relation to a product entity
  28.      *
  29.      * @var \XLite\Model\Product
  30.      *
  31.      * @ORM\ManyToOne  (targetEntity="XLite\Model\Product", inversedBy="level4Product")
  32.      * @ORM\JoinColumn (name="productId", referencedColumnName="product_id", onDelete="CASCADE")
  33.      */
  34.     protected $product;
  35.     /**
  36.      * Relation to a model entity
  37.      *
  38.      * @var \QSL\Make\Model\Level4
  39.      *
  40.      * @ORM\ManyToOne  (targetEntity="QSL\Make\Model\Level4", inversedBy="level4Product")
  41.      * @ORM\JoinColumn (name="level4Id", referencedColumnName="id", onDelete="CASCADE")
  42.      */
  43.     protected $level;
  44.     public function getLevel()
  45.     {
  46.         return $this->level;
  47.     }
  48.     public function setLevel($value)
  49.     {
  50.         $this->level $value;
  51.         return $this;
  52.     }
  53. }