kokjan/common/models/GisProvince.php

59 lines
1.3 KiB
PHP
Raw Normal View History

<?php
namespace common\models;
use Yii;
/**
* This is the model class for table "gis_province".
*
* @property int $id
* @property string|null $pv_code รหัสจังหวัด
* @property string|null $pv_name_th จังหวัด
* @property string|null $pv_name_en Province
* @property float|null $area_km2
* @property string|null $geom
*/
class GisProvince extends \yii\db\ActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'gis_province';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['pv_code', 'pv_name_th', 'pv_name_en', 'area_km2', 'geom'], 'default', 'value' => null],
[['area_km2'], 'number'],
[['geom'], 'string'],
[['pv_code'], 'string', 'max' => 2],
[['pv_name_th', 'pv_name_en'], 'string', 'max' => 80],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'pv_code' => 'รหัสจังหวัด',
'pv_name_th' => 'จังหวัด',
'pv_name_en' => 'Province',
'area_km2' => 'Area Km2',
'geom' => 'Geom',
];
}
}