mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
增加onlyTrashed方法
This commit is contained in:
@@ -44,6 +44,17 @@ trait SoftDelete
|
|||||||
return $model->db();
|
return $model->db();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 只查询软删除数据
|
||||||
|
* @access public
|
||||||
|
* @return \think\db\Query
|
||||||
|
*/
|
||||||
|
public static function onlyTrashed()
|
||||||
|
{
|
||||||
|
$model = new static();
|
||||||
|
return $model->db()->where(static::$deleteTime, '>', 0);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除当前的记录
|
* 删除当前的记录
|
||||||
* @access public
|
* @access public
|
||||||
|
|||||||
Reference in New Issue
Block a user