<?php
/**
 *
 *User:Administrator
 *Date:2021/10/11
 */

namespace app\api\model;

use think\Model;

class Pesticides extends Model
{
    protected $table = 't_pesticides';
    protected $pk = 'id';

    public function selectPesticidesList($name='',$pageNum=1,$pageSize=10)
    {
        return $this->where('name', 'like', '%' . $name . '%')->page($pageNum, $pageSize)->select();
    }

    public function countPesticidesList($name = '')
    {
        return $this->where('name', 'like', '%' . $name . '%')->count();
    }


}