ltsecurityinc安防产品在线商城代码
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Lts\Inventory\Api\Data;
|
||||
|
||||
use Magento\InventoryApi\Api\Data\SourceInterface;
|
||||
|
||||
interface SourceCustomerInterface
|
||||
{
|
||||
|
||||
const ENTITY_ID = 'entity_id';
|
||||
|
||||
const CUSTOMER_ID = 'customer_id';
|
||||
const SOURCE_CODE = 'source_code';
|
||||
|
||||
const INVENTORY_SOURCE = 'inventory_source';
|
||||
|
||||
|
||||
/**
|
||||
* Get entity_id
|
||||
* @return int
|
||||
*/
|
||||
public function getEntityId();
|
||||
|
||||
/**
|
||||
* Get source_code
|
||||
* @return string|null
|
||||
*/
|
||||
public function getSourceCode();
|
||||
|
||||
/**
|
||||
* Set source_code
|
||||
* @param string $sourceCode
|
||||
* @return $this
|
||||
*/
|
||||
public function setSourceCode(string $sourceCode);
|
||||
|
||||
/**
|
||||
* Get customer_id
|
||||
* @return int|null
|
||||
*/
|
||||
public function getCustomerId();
|
||||
|
||||
/**
|
||||
* Set customer_id
|
||||
* @param string $customerId
|
||||
* @return $this
|
||||
*/
|
||||
public function setCustomerId(string $customerId);
|
||||
|
||||
/**
|
||||
* @return SourceInterface
|
||||
*/
|
||||
public function getSource();
|
||||
|
||||
/**
|
||||
* @param SourceInterface $source
|
||||
* @return $this
|
||||
*/
|
||||
public function setSource(SourceInterface $source);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Lts\Inventory\Api\Data;
|
||||
|
||||
interface SourceCustomerSearchResultsInterface extends \Magento\Framework\Api\SearchResultsInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Get SourceCustomer list.
|
||||
* @return \Lts\Inventory\Api\Data\SourceCustomerInterface[]
|
||||
*/
|
||||
public function getItems();
|
||||
|
||||
/**
|
||||
* Set entity_id list.
|
||||
* @param \Lts\Inventory\Api\Data\SourceCustomerInterface[] $items
|
||||
* @return $this
|
||||
*/
|
||||
public function setItems(array $items);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright © All rights reserved.
|
||||
* See COPYING.txt for license details.
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Lts\Inventory\Api;
|
||||
|
||||
use Lts\Inventory\Api\Data\SourceCustomerInterface;
|
||||
use Magento\Framework\Api\SearchCriteriaInterface;
|
||||
|
||||
interface SourceCustomerRepositoryInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* Save SourceCustomer
|
||||
* @param \Lts\Inventory\Api\Data\SourceCustomerInterface $sourceCustomer
|
||||
* @return \Lts\Inventory\Api\Data\SourceCustomerInterface
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function save(
|
||||
\Lts\Inventory\Api\Data\SourceCustomerInterface $sourceCustomer
|
||||
);
|
||||
|
||||
/**
|
||||
* Retrieve SourceCustomer
|
||||
* @param int $customerId
|
||||
* @return \Lts\Inventory\Api\Data\SourceCustomerInterface
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function getFromCustomerId(int $customerId): ?SourceCustomerInterface;
|
||||
|
||||
/**
|
||||
* Retrieve SourceCustomer
|
||||
* @param string $id
|
||||
* @return \Lts\Inventory\Api\Data\SourceCustomerInterface
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function get($id);
|
||||
|
||||
/**
|
||||
* Retrieve Inventory Source from customer id.
|
||||
* @param string $customerId
|
||||
* @return \Lts\Inventory\Api\Data\SourceCustomerSearchResultsInterface
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function getList( string $customerId);
|
||||
|
||||
/**
|
||||
* Delete SourceCustomer
|
||||
* @param \Lts\Inventory\Api\Data\SourceCustomerInterface $inventorySourceCustomer
|
||||
* @return bool true on success
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function delete(
|
||||
\Lts\Inventory\Api\Data\SourceCustomerInterface $inventorySourceCustomer
|
||||
);
|
||||
|
||||
/**
|
||||
* Delete SourceCustomer by ID
|
||||
* @param int $entityId
|
||||
* @return bool true on success
|
||||
* @throws \Magento\Framework\Exception\NoSuchEntityException
|
||||
* @throws \Magento\Framework\Exception\LocalizedException
|
||||
*/
|
||||
public function deleteById(int $entityId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user