<?php

namespace App\Models\Common;

use App\Models\Model;

/**
 * App\Models\Common\CityModel
 *
 * @property int $id
 * @property string $province 省份
 * @property string $city 城市
 * @property string $province_name 省份全称
 * @property string $city_name 城市全称
 * @property int $sort
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel query()
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel whereCity($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel whereCityName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel whereProvince($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel whereProvinceName($value)
 * @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Common\CityModel whereSort($value)
 * @mixin \Eloquent
 */
class CityModel extends Model
{

    protected $table = "fpdx_citys";


    protected $appends = ['full_name'];


    /**
     * 获取城市全称
     * @return string
     */
    public function getFullNameAttribute()
    {
        return "{$this->province}-{$this->city}";
    }
}
