52 lines
1.0 KiB
PHP
52 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace common\modelsgii;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "yii_drugstore".
|
|
*
|
|
* @property int $id 主键id
|
|
* @property string $name 药房名称
|
|
* @property string $position 药房位置
|
|
* @property int $created_at
|
|
* @property int $updated_at
|
|
*/
|
|
class Drugstore extends \common\core\BaseActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'yii_drugstore';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['name', 'position', 'created_at', 'updated_at'], 'required'],
|
|
[['created_at', 'updated_at'], 'integer'],
|
|
[['name', 'position'], 'string', 'max' => 100],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'name' => 'Name',
|
|
'position' => 'Position',
|
|
'created_at' => 'Created At',
|
|
'updated_at' => 'Updated At',
|
|
];
|
|
}
|
|
}
|