Stock.php 864 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. declare(strict_types=1);
  7. namespace Magento\Inventory\Model\ResourceModel;
  8. use Magento\Framework\Model\ResourceModel\Db\AbstractDb;
  9. use Magento\InventoryApi\Api\Data\StockInterface;
  10. use Magento\Framework\Model\ResourceModel\PredefinedId;
  11. /**
  12. * Implementation of basic operations for Stock entity for specific db layer
  13. */
  14. class Stock extends AbstractDb
  15. {
  16. /**
  17. * Provides possibility of saving entity with predefined/pre-generated id
  18. */
  19. use PredefinedId;
  20. /**#@+
  21. * Constants related to specific db layer
  22. */
  23. const TABLE_NAME_STOCK = 'inventory_stock';
  24. /**#@-*/
  25. /**
  26. * @inheritdoc
  27. */
  28. protected function _construct()
  29. {
  30. $this->_init(self::TABLE_NAME_STOCK, StockInterface::STOCK_ID);
  31. }
  32. }