Files
xk-api-yii/common/modelsgii/Department.php
2024-09-19 11:32:39 +08:00

56 lines
1.2 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
namespace common\modelsgii;
use Yii;
/**
* This is the model class for table "yii_department".
*
* @property int $id
* @property string $name 科室名称
* @property int $pid 父级id
* @property int $level level
* @property int $feature 是否是重点特色专科 0 不是1是
* @property int $created_at
* @property int $updated_at
*/
class Department extends \common\core\BaseActiveRecord
{
/**
* {@inheritdoc}
*/
public static function tableName()
{
return 'yii_department';
}
/**
* {@inheritdoc}
*/
public function rules()
{
return [
[['name', 'pid', 'level'], 'required'],
[['pid', 'level', 'feature', 'created_at', 'updated_at'], 'integer'],
[['name'], 'string', 'max' => 50],
];
}
/**
* {@inheritdoc}
*/
public function attributeLabels()
{
return [
'id' => 'ID',
'name' => 'Name',
'pid' => 'Pid',
'level' => 'Level',
'feature' => 'Feature',
'created_at' => 'Created At',
'updated_at' => 'Updated At',
];
}
}