| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?php
- /**
- * 厦门云联储网络科技有限公司
- * https://www.baokuaiyun.com
- * Copyright (c) 2023 爆块云 All rights reserved.
- */
- namespace app\models;
- use Yii;
- /**
- * This is the model class for table "{{%plugins}}".
- *
- * @property integer $id
- * @property integer $store_id
- * @property string $name
- * @property string $key
- * @property string $version
- * @property string $main_version
- * @property integer $status
- * @property integer $is_can_update
- * @property integer $is_can_install
- * @property integer $expire_time
- * @property integer $updated_at
- * @property integer $created_at
- */
- class Plugins extends \yii\db\ActiveRecord
- {
- /**
- * TODO: status 状态
- */
- const STATUS_OPEN = 1;
- const STATUS_CLOSE = 0;
- /**
- * 远程或者本地
- */
- const TYPE_FROM_CLOUD = 1;
- const TYPE_FROM_LOCAL = 2;
- /**
- * 安装或者未安装
- */
- const TYPE_INSTALL_TRUE = 1;
- const TYPE_INSTALL_FALSE = 0;
- /**
- * @inheritdoc
- */
- public static function tableName()
- {
- return '{{%plugins}}';
- }
- /**
- * @inheritdoc
- */
- public function rules()
- {
- return [
- [['store_id', 'status', 'created_at', 'updated_at', 'expire_time','is_can_update', 'is_can_install'],
- 'integer'],
- [['name', 'key', 'version', 'main_version'], 'string'],
- [['name', 'key'], 'string', 'max' => 255],
- ];
- }
- /**
- * @inheritdoc
- */
- public function attributeLabels()
- {
- return [
- 'id' => 'ID',
- 'store_id' => 'Store ID',
- 'name' => '名称',
- 'key' => '唯一标识',
- 'version' => '插件版本',
- 'main_version' => '代码主版本',
- 'status' => '状态',
- 'is_can_update' => '是否可以更新',
- 'is_can_install' => '是否可以下载',
- 'created_at' => '添加时间',
- 'updated_at' => '更新时间',
- 'expire_time' => '过期时间',
- ];
- }
- }
|