<?php
/**
 * Created by PhpStorm.
 * User: bmb369
 * Date: 2024-05-07
 * Time: 14:20
 */
namespace App\Models;

use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Support\Facades\DB;
class AreaProvinceModel extends Base {

    protected $table = 'gz_area_province';
    use SoftDeletes;

    protected $dates = ['deleted_at'];
    protected $primaryKey = 'id';


    public function selectinfo(array $where, $field = ["*"])
    {
        return AreaProvinceModel::where($where)->orderBy('sort', 'desc')->orderBy('id', 'asc')->get($field)->toArray();
    }
    public function selectinfo2(array $where,array $wherein, $field = ["*"])
    {
        return AreaProvinceModel::where($where)->wherein('area_code',$wherein)->orderBy('sort', 'desc')->orderBy('id', 'asc')->get($field)->toArray();
    }




}