StoreProductAttrResultDao.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  4. // +----------------------------------------------------------------------
  5. // | Copyright (c) 2016~2023 https://www.crmeb.com All rights reserved.
  6. // +----------------------------------------------------------------------
  7. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  8. // +----------------------------------------------------------------------
  9. // | Author: CRMEB Team <admin@crmeb.com>
  10. // +----------------------------------------------------------------------
  11. namespace app\dao\product\sku;
  12. use app\dao\BaseDao;
  13. use app\model\product\sku\StoreProductAttrResult;
  14. /**
  15. * Class StoreProductAttrResultDao
  16. * @package app\dao\product\sku
  17. */
  18. class StoreProductAttrResultDao extends BaseDao
  19. {
  20. /**
  21. * 设置模型
  22. * @return string
  23. */
  24. protected function setModel(): string
  25. {
  26. return StoreProductAttrResult::class;
  27. }
  28. /**
  29. * 删除指定条件下的sku
  30. * @param int $id
  31. * @param int $type
  32. * @return bool
  33. * @throws \Exception
  34. */
  35. public function del(int $id, int $type)
  36. {
  37. return $this->search(['product_id' => $id, 'type' => $type])->delete();
  38. }
  39. }