GuaranteeValueDao.php 536 B

1234567891011121314151617181920212223242526
  1. <?php
  2. namespace app\common\dao\store;
  3. use app\common\dao\BaseDao;
  4. use app\common\model\store\GuaranteeValue;
  5. class GuaranteeValueDao extends BaseDao
  6. {
  7. protected function getModel(): string
  8. {
  9. return GuaranteeValue::class;
  10. }
  11. public function chageStatus(int $id,int $status)
  12. {
  13. $this->getModel()::getDB()->where('guarantee_id',$id)->update(['status' => $status]);
  14. }
  15. public function clear($id)
  16. {
  17. $this->getModel()::getDB()->where('guarantee_template_id',$id)->delete();
  18. }
  19. }