62 lines
1.6 KiB
PHP
Executable File
62 lines
1.6 KiB
PHP
Executable File
<?php
|
|
|
|
namespace common\models;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "gis_base".
|
|
*
|
|
* @property int $id
|
|
* @property string $name ชื่อ
|
|
* @property string|null $description รายละเอียด
|
|
* @property int|null $created_at เพิ่มเมื่อ
|
|
* @property int|null $updated_at แก้ไขเมื่อ
|
|
* @property int|null $created_by เพิ่มโดย
|
|
* @property int|null $updated_by แก้ไขโดย
|
|
*/
|
|
class GisBase extends \yii\db\ActiveRecord
|
|
{
|
|
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'gis_base';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['description', 'created_at', 'updated_at', 'created_by', 'updated_by'], 'default', 'value' => null],
|
|
[['name'], 'required'],
|
|
[['description'], 'string'],
|
|
[['created_at', 'updated_at', 'created_by', 'updated_by'], 'integer'],
|
|
[['name'], 'string', 'max' => 500],
|
|
[['color'], 'string', 'max' => 50]
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'name' => 'ชื่อ',
|
|
'description' => 'รายละเอียด',
|
|
'created_at' => 'เพิ่มเมื่อ',
|
|
'updated_at' => 'แก้ไขเมื่อ',
|
|
'created_by' => 'เพิ่มโดย',
|
|
'updated_by' => 'แก้ไขโดย',
|
|
];
|
|
}
|
|
|
|
}
|