74 lines
2.1 KiB
PHP
Executable File
74 lines
2.1 KiB
PHP
Executable File
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "gis_tambon".
|
|
*
|
|
* @property int $id
|
|
* @property string|null $geom
|
|
* @property string|null $pv_code จังหวัด
|
|
* @property string|null $ap_no
|
|
* @property string|null $ap_code อำเภอ
|
|
* @property string|null $tb_code รหัสตำบล
|
|
* @property string|null $pv_name_t จังหวัด
|
|
* @property string|null $pv_name_e Province
|
|
* @property string|null $ap_name_t อำเภอ
|
|
* @property string|null $ap_name_e District
|
|
* @property string|null $tb_name_t ตำบล
|
|
* @property string|null $tb_name_e Sub District
|
|
* @property string|null $tb_no
|
|
*/
|
|
class GisTambon extends \yii\db\ActiveRecord
|
|
{
|
|
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'gis_tambon';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['geom', 'pv_code', 'ap_no', 'ap_code', 'tb_code', 'pv_name_t', 'pv_name_e', 'ap_name_t', 'ap_name_e', 'tb_name_t', 'tb_name_e', 'tb_no'], 'default', 'value' => null],
|
|
[['geom'], 'string'],
|
|
[['pv_code'], 'string', 'max' => 2],
|
|
[['ap_no'], 'string', 'max' => 30],
|
|
[['ap_code', 'tb_code', 'tb_no'], 'string', 'max' => 10],
|
|
[['pv_name_t', 'pv_name_e', 'ap_name_t', 'ap_name_e', 'tb_name_t', 'tb_name_e'], 'string', 'max' => 300],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'geom' => 'Geom',
|
|
'pv_code' => 'จังหวัด',
|
|
'ap_no' => 'Ap No',
|
|
'ap_code' => 'อำเภอ',
|
|
'tb_code' => 'รหัสตำบล',
|
|
'pv_name_t' => 'จังหวัด',
|
|
'pv_name_e' => 'Province',
|
|
'ap_name_t' => 'อำเภอ',
|
|
'ap_name_e' => 'District',
|
|
'tb_name_t' => 'ตำบล',
|
|
'tb_name_e' => 'Sub District',
|
|
'tb_no' => 'Tb No',
|
|
];
|
|
}
|
|
|
|
}
|