Files
2026-09-15 10:26:34 +08:00

106 lines
1.9 KiB
PHP

<?php
/**
* Copyright © All rights reserved.
* See COPYING.txt for license details.
*/
declare(strict_types=1);
namespace Stemcell\SubItemProduct\Model;
use Magento\Framework\Model\AbstractModel;
use Stemcell\SubItemProduct\Api\Data\SubItemInterface;
class SubItem extends AbstractModel implements SubItemInterface
{
/**
* @inheritDoc
*/
public function _construct()
{
$this->_init(\Stemcell\SubItemProduct\Model\ResourceModel\SubItem::class);
}
/**
* @inheritDoc
*/
public function getSubitemId()
{
return $this->getData(self::SUBITEM_ID);
}
/**
* @inheritDoc
*/
public function setSubitemId($subitemId)
{
return $this->setData(self::SUBITEM_ID, $subitemId);
}
/**
* @inheritDoc
*/
public function getProductId()
{
return $this->getData(self::PRODUCT_ID);
}
/**
* @inheritDoc
*/
public function setProductId($productId)
{
$this->setData(self::PRODUCT_ID, $productId);
return $this;
}
/**
* @inheritDoc
*/
public function getSubSku()
{
return $this->getData(self::SUB_SKU);
}
/**
* @inheritDoc
*/
public function setSubSku(string $subSku)
{
return $this->setData(self::SUB_SKU, $subSku);
}
/**
* @inheritDoc
*/
public function getBundleQty()
{
return (int)$this->getData(self::BUNDLE_QTY);
}
/**
* @inheritDoc
*/
public function setBundleQty(int $bundleQty)
{
return $this->setData(self::BUNDLE_QTY, $bundleQty);
}
/**
* @inheritDoc
*/
public function getStockQty()
{
return (int)$this->getData(self::STOCK_QTY);
}
/**
* @inheritDoc
*/
public function setStockQty(int $stockQty)
{
return $this->setData(self::STOCK_QTY, $stockQty);
}
}