mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进软删除操作
This commit is contained in:
@@ -1120,6 +1120,20 @@ class Query
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置软删除字段及条件
|
||||
* @access public
|
||||
* @param false|string $field 查询字段
|
||||
* @param mixed $condition 查询条件
|
||||
* @return $this
|
||||
*/
|
||||
public function useSoftDelete($field, $condition = null)
|
||||
{
|
||||
if ($field) {
|
||||
$this->options['soft_delete'] = [$field, $condition ?: ['null', '']];
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 分析查询表达式
|
||||
* @access public
|
||||
|
||||
Reference in New Issue
Block a user