You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

49 lines
928 B

<?php
declare (strict_types=1);
namespace app\api\model;
use app\Request;
use think\facade\Db;
use think\Model;
/**
* @mixin think\Model
*/
class Debris extends CmsCommon
{
protected $table = 'bmz_debris';
/**
* 管理员列表数据模型
* @return array|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function index()
{
$this->search_arr = ['title','name'];
$_op = $this->field('*');
//执行通用查询
return parent::parentLists($_op);
}
/**
* 读取后
* @param Model $model
* @return bool|void
*/
public static function onAfterRead(Model $model)
{
if (in_array(request()->action(), ['edit', 'delete', 'status'])) {
return true;
}
}
}