mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2026-06-07 12:38:11 +08:00
Update Model.php
This commit is contained in:
parent
287951f7e3
commit
19abfdaaf8
@ -19,7 +19,6 @@ declare (strict_types=1);
|
||||
namespace think\admin;
|
||||
|
||||
use think\admin\helper\QueryHelper;
|
||||
use think\db\Express;
|
||||
|
||||
/**
|
||||
* 基础模型类
|
||||
@ -116,30 +115,4 @@ abstract class Model extends \think\Model
|
||||
return parent::__callStatic($method, $args);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 字段值增长
|
||||
* @param string $field 字段名
|
||||
* @param float $step 增长值
|
||||
* @param int $lazyTime 延迟时间(秒)
|
||||
* @return $this
|
||||
*/
|
||||
public function inc(string $field, float $step = 1, int $lazyTime = 0)
|
||||
{
|
||||
return $this->set($field, new Express('+', $step, $lazyTime));
|
||||
}
|
||||
|
||||
/**
|
||||
* 字段值减少.
|
||||
*
|
||||
* @param string $field 字段名
|
||||
* @param float $step 增长值
|
||||
* @param int $lazyTime 延迟时间(秒)
|
||||
* @return $this
|
||||
*/
|
||||
public function dec(string $field, float $step = 1, int $lazyTime = 0)
|
||||
{
|
||||
return $this->set($field, new Express('-', $step, $lazyTime));
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user