<?php
namespace App\Sports\Model;

use \System\Model;

/**
 * Class St_country
 * @package App\Sports\Model
 * 地区 洲
 */
class St_area extends Model
{

    protected $table = 'st_area';

    //根据地区id获取地区名称
    public static function getName($areaId = ''){
        $where = [];
        //拼装查询条件
        if(!empty($areaId)){
            $where = [
                ['id','=',$areaId]
            ];
        }
        $name = self::select('id','title')
            ->where($where)
            ->get()
            ->toArray();
        return $name;
    }
}