<?php
namespace app\common\model;
class City extends Base
{
   protected $autoCheckFields = true;

//是否存在地区名
   public function isCityName($site_name){
     $where['site_name'] = $site_name;
     $result = $this->where($where)->find();
     if($result){
       return true;
     }else{
       return false;
     }
   }

 public function getCityById($id){
    $where['id'] = $id;
    $data = $this->where($where)->find();
    if($data){
      return $data;
    }else{
      return false;
    }
 }


}
