1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace app\modules\admin\models;
- use Yii;
- /**
- * This is the model class for table "{{%role}}".
- *
- * @property int $role_id 角色ID
- * @property string $role_name 角色名称
- * @property string|null $description 角色描述
- * @property int $disabled 状态:1,禁用
- */
- class Role extends \app\common\models\EActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%role}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['role_name'], 'required'],
- [['description'], 'string'],
- [['disabled'], 'integer'],
- [['role_name'], 'string', 'max' => 50],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'role_id' => Yii::t('attr','role.role_id'),
- 'role_name' => Yii::t('attr','role.role_name'),
- 'description' => Yii::t('attr','role.description'),
- 'disabled' => Yii::t('attr','role.disabled'),
- ];
- }
- }
|