59 lines
1.3 KiB
PHP
59 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace common\modelsgii;
|
|
|
|
use Yii;
|
|
|
|
/**
|
|
* This is the model class for table "yii_drug_categories".
|
|
*
|
|
* @property int $id
|
|
* @property int $level 分类等级
|
|
* @property int $parent_id 父级id
|
|
* @property string $category_name 分类名称
|
|
* @property int $sort 排序
|
|
* @property string|null $created_at
|
|
* @property string|null $updated_at
|
|
* @property string|null $deleted_at
|
|
*/
|
|
class DrugCategories extends \common\core\BaseActiveRecord
|
|
{
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public static function tableName()
|
|
{
|
|
return 'yii_drug_categories';
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function rules()
|
|
{
|
|
return [
|
|
[['level', 'parent_id', 'category_name', 'sort'], 'required'],
|
|
[['level', 'parent_id', 'sort'], 'integer'],
|
|
[['created_at', 'updated_at', 'deleted_at'], 'safe'],
|
|
[['category_name'], 'string', 'max' => 255],
|
|
];
|
|
}
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*/
|
|
public function attributeLabels()
|
|
{
|
|
return [
|
|
'id' => 'ID',
|
|
'level' => 'Level',
|
|
'parent_id' => 'Parent ID',
|
|
'category_name' => 'Category Name',
|
|
'sort' => 'Sort',
|
|
'created_at' => 'Created At',
|
|
'updated_at' => 'Updated At',
|
|
'deleted_at' => 'Deleted At',
|
|
];
|
|
}
|
|
}
|