File: /home/safarimaris/home/safarimaris/common/models/Region.php
<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "region".
*
* @property integer $id
* @property integer $ordinal
* @property string $name
*/
class Region extends \yii\db\ActiveRecord
{
/**
* @inheritdoc
*/
public static function tableName()
{
return 'region';
}
/**
* @inheritdoc
*/
public function rules()
{
return [
[['ordinal', 'name'], 'required'],
[['ordinal'], 'integer'],
[['name'], 'string', 'max' => 255],
];
}
/**
* @inheritdoc
*/
public function attributeLabels()
{
return [
'id' => Yii::t('model', 'ID'),
'ordinal' => Yii::t('model', 'Ordinal number'),
'name' => Yii::t('model', 'Name'),
];
}
}