<?php

namespace App\Models;
use Illuminate\Database\Eloquent\SoftDeletes;

class School extends Base
{
    //表名声明
    protected $table = 'gz_school';
    use SoftDeletes;

    //主键声明
    protected $primaryKey = 'id';
    protected $dates = ['deleted_at'];


    public function selectinfoForPaginate(array $where, $field = ["*"], $offset, $perPage )
    {
        return  School::where($where)->orderBy('id', 'asc')->skip($offset)->take($perPage)->get($field)->toArray();
    }
    public function selectinfoForPaginateCount(array $where )
    {
        return  School::where($where)->count();
    }





}
