ProductContentDao.php 514 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. namespace app\common\dao\store\product;
  3. use app\common\dao\BaseDao;
  4. use app\common\model\store\product\ProductContent as model;
  5. class ProductContentDao extends BaseDao
  6. {
  7. protected function getModel(): string
  8. {
  9. return model::class;
  10. }
  11. /**
  12. * @Author:Qinii
  13. * @Date: 2020/5/9
  14. * @param int $productId
  15. * @return mixed
  16. */
  17. public function clearAttr(int $productId)
  18. {
  19. return ($this->getModel())::where('product_id',$productId)->delete();
  20. }
  21. }