You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
861 B
51 lines
861 B
<?php
|
|
|
|
namespace common\models\ars;
|
|
|
|
use Yii;
|
|
use yii\behaviors\TimestampBehavior;
|
|
|
|
/**
|
|
* This is the model class for table "city".
|
|
*
|
|
* @property int $id
|
|
* @property int $city_id
|
|
* @property string $name
|
|
* @property int $province_id
|
|
*/
|
|
class City extends \yii\db\ActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'city';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['city_id', 'province_id'], 'integer'],
|
|
[['name'], 'string', 'max' => 32],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'id',
|
|
'city_id' => 'city_id',
|
|
'name' => 'name',
|
|
'province_id' => 'province_id',
|
|
];
|
|
}
|
|
|
|
|
|
}
|