admin-api/app/common/dao/store/product/ProductCdkeyDao.php

23 lines
400 B
PHP

<?php
namespace app\common\dao\store\product;
use app\common\dao\BaseDao;
use app\common\model\store\product\ProductCdkey as model;
class ProductCdkeyDao extends BaseDao
{
protected function getModel(): string
{
return model::class;
}
public function clearAttr(int $productId)
{
return ($this->getModel())::where('product_id',$productId)->delete();
}
}