modules/XC/ProductVariations/src/Model/Variation.php line 16

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 XC\ProductVariations\Model;
  7. use Doctrine\ORM\Mapping as ORM;
  8. /**
  9.  * @ORM\Entity
  10.  * @ORM\Table  (name="product_variation")
  11.  */
  12. class Variation extends \XLite\Model\AEntity
  13. {
  14.     /**
  15.      * @ORM\Id
  16.      * @ORM\GeneratedValue (strategy="AUTO")
  17.      * @ORM\Column         (type="integer", options={ "unsigned": true })
  18.      */
  19.     protected ?int $id;
  20.     /**
  21.      * @ORM\ManyToOne (targetEntity="\XLite\Model\Product")
  22.      * @ORM\JoinColumn (name="product_id", referencedColumnName="product_id", onDelete="CASCADE")
  23.      */
  24.     protected \XLite\Model\Product $product;
  25.     /**
  26.      * @ORM\ManyToOne (targetEntity="\XC\ProductVariations\Model\VariationBase")
  27.      * @ORM\JoinColumn (name="base_id", referencedColumnName="id", onDelete="CASCADE")
  28.      */
  29.     protected VariationBase $base;
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     public function getProduct(): \XLite\Model\Product
  35.     {
  36.         return $this->product;
  37.     }
  38.     public function setProduct(\XLite\Model\Product $product): void
  39.     {
  40.         $this->product $product;
  41.     }
  42.     public function getBase(): VariationBase
  43.     {
  44.         return $this->base;
  45.     }
  46.     public function setBase(VariationBase $base): void
  47.     {
  48.         $this->base $base;
  49.     }
  50. }