<?php


namespace app\lib\model;


use think\Model;

class SurnameModel extends Model
{

    // 表名
    protected $name = 'surname';


    /**
     * 查询单挑数据
     */
    public static function dataInfo($where,$order="ID desc"){
        return self::where($where)->order($order)->find();
    }

    /**
     * 查询列表
     */
    public static function dataList($where,$page,$mapor=[],$order="EnglishAbb asc"){
        $data = self::where($where) ->where(function ($query) use ($mapor){
            $query->whereOr($mapor);
        })->order($order)->paginate($page)->toArray();

        return $data;
    }



}