init
This commit is contained in:
@@ -0,0 +1,105 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user