model中需use traits\model\SoftDelete; // 数据表中需添加一个 delete_time 字段保存删除时间 namespace app\index\model; use think\Model; use traits\model\SoftDelete; class User extends Model { use SoftDelete; protected static $deleteTime = 'delete_time'; // 5.2版本之前必须用stati…