// +---------------------------------------------------------------------- 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(); } }