commit | author | age
|
2207d6
|
1 |
<?php |
W |
2 |
|
|
3 |
namespace app\models; |
|
4 |
|
|
5 |
use Yii; |
|
6 |
|
|
7 |
/** |
|
8 |
* This is the model class for table "{{%attachment_storage}}". |
|
9 |
* |
|
10 |
* @property string $id |
|
11 |
* @property int $mall_id |
|
12 |
* @property int $type 存储类型:1=本地,2=阿里云,3=腾讯云,4=七牛 |
|
13 |
* @property string $config 存储配置 |
|
14 |
* @property int $status 状态:0=未启用,1=已启用 |
|
15 |
* @property string $created_at |
|
16 |
* @property string $updated_at |
|
17 |
* @property int $user_id 存储设置所属账号 |
|
18 |
*/ |
|
19 |
class AttachmentStorage extends ModelActiveRecord |
|
20 |
{ |
|
21 |
const STORAGE_TYPE_LOCAL = 1; |
|
22 |
const STORAGE_TYPE_ALIOSS = 2; |
|
23 |
const STORAGE_TYPE_TXCOS = 3; |
|
24 |
const STORAGE_TYPE_QINIU = 4; |
|
25 |
|
|
26 |
/** |
|
27 |
* {@inheritdoc} |
|
28 |
*/ |
|
29 |
public static function tableName() |
|
30 |
{ |
|
31 |
return '{{%attachment_storage}}'; |
|
32 |
} |
|
33 |
|
|
34 |
/** |
|
35 |
* {@inheritdoc} |
|
36 |
*/ |
|
37 |
public function rules() |
|
38 |
{ |
|
39 |
return [ |
|
40 |
[['mall_id', 'type', 'status', 'user_id'], 'integer'], |
|
41 |
[['config'], 'required'], |
|
42 |
[['config'], 'string'], |
|
43 |
[['created_at', 'updated_at'], 'safe'], |
|
44 |
]; |
|
45 |
} |
|
46 |
|
|
47 |
/** |
|
48 |
* {@inheritdoc} |
|
49 |
*/ |
|
50 |
public function attributeLabels() |
|
51 |
{ |
|
52 |
return [ |
|
53 |
'id' => 'ID', |
|
54 |
'mall_id' => 'Mall ID', |
|
55 |
'type' => '存储类型:1=本地,2=阿里云,3=腾讯云,4=七牛', |
|
56 |
'config' => '存储配置', |
|
57 |
'status' => '状态:0=未启用,1=已启用', |
|
58 |
'created_at' => 'Created At', |
|
59 |
'updated_at' => 'Updated At', |
|
60 |
'user_id' => '存储设置所属账号', |
|
61 |
]; |
|
62 |
} |
|
63 |
} |