Files
xk-api-yii/common/modelsgii/Department.php

56 lines
1.2 KiB
PHP
Raw Normal View History

2024-09-19 11:32:39 +08:00
<?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',
];
}
}