<?php
/**
* Copyright (c) 2011-present Qualiteam software Ltd. All rights reserved.
* See https://www.x-cart.com/license-agreement.html for license details.
*/
namespace XC\ProductVariations\Model;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity
* @ORM\Table (name="product_variation")
*/
class Variation extends \XLite\Model\AEntity
{
/**
* @ORM\Id
* @ORM\GeneratedValue (strategy="AUTO")
* @ORM\Column (type="integer", options={ "unsigned": true })
*/
protected ?int $id;
/**
* @ORM\ManyToOne (targetEntity="\XLite\Model\Product")
* @ORM\JoinColumn (name="product_id", referencedColumnName="product_id", onDelete="CASCADE")
*/
protected \XLite\Model\Product $product;
/**
* @ORM\ManyToOne (targetEntity="\XC\ProductVariations\Model\VariationBase")
* @ORM\JoinColumn (name="base_id", referencedColumnName="id", onDelete="CASCADE")
*/
protected VariationBase $base;
public function getId(): ?int
{
return $this->id;
}
public function getProduct(): \XLite\Model\Product
{
return $this->product;
}
public function setProduct(\XLite\Model\Product $product): void
{
$this->product = $product;
}
public function getBase(): VariationBase
{
return $this->base;
}
public function setBase(VariationBase $base): void
{
$this->base = $base;
}
}