1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- <?php
- declare (strict_types=1);
- namespace app\dao\other;
- use app\dao\BaseDao;
- use app\model\other\Qrcode;
- class QrcodeDao extends BaseDao
- {
-
- protected function setModel(): string
- {
- return Qrcode::class;
- }
-
- public function getQrcode($id, $type = 'id')
- {
- return $this->getModel()->where($type, $id)->find();
- }
-
- public function scanQrcode($id, $type = 'id')
- {
- return $this->getModel()->where($type, $id)->inc('scan')->update();
- }
- }
|