123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?php
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%module}}".
- *
- * @property int $id
- * @property string $module 模块名称
- * @property string $name 别名
- * @property string $url url
- * @property int $is_core 是否核心
- * @property string $version 版本
- * @property string $description 描述
- * @property string|null $settings 设置
- * @property int $list_order 排序
- * @property int $disabled 状态 1:禁用 0:可用
- * @property int $install_time 安装时间
- * @property int $update_time 更新时间
- */
- class Module extends \app\common\models\EActiveRecord
- {
- /**
- * {@inheritdoc}
- */
- public static function tableName()
- {
- return '{{%module}}';
- }
- /**
- * {@inheritdoc}
- */
- public function rules()
- {
- return [
- [['module', 'name'], 'required'],
- [['is_core', 'list_order', 'disabled', 'install_time', 'update_time'], 'integer'],
- [['settings'], 'string'],
- [['module'], 'string', 'max' => 15],
- [['name'], 'string', 'max' => 20],
- [['url', 'description'], 'string', 'max' => 255],
- [['version'], 'string', 'max' => 50],
- ];
- }
- /**
- * {@inheritdoc}
- */
- public function attributeLabels()
- {
- return [
- 'id' => Yii::t('attr','module.id'),
- 'module' => Yii::t('attr','module.module'),
- 'name' => Yii::t('attr','module.name'),
- 'url' => Yii::t('attr','module.url'),
- 'is_core' => Yii::t('attr','module.is_core'),
- 'version' => Yii::t('attr','module.version'),
- 'description' => Yii::t('attr','module.description'),
- 'settings' => Yii::t('attr','module.settings'),
- 'list_order' => Yii::t('attr','module.list_order'),
- 'disabled' => Yii::t('attr','module.disabled'),
- 'install_time' => Yii::t('attr','module.install_time'),
- 'update_time' => Yii::t('attr','module.update_time'),
- ];
- }
- }
|