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 "{{%qr_code_parameter}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property int $mall_id |
|
12 |
* @property int $user_id |
|
13 |
* @property string $token |
|
14 |
* @property string $data |
|
15 |
* @property string $created_at |
|
16 |
* @property string $path 小程序路径 |
|
17 |
* @property int $use_number 使用次数 |
|
18 |
*/ |
|
19 |
class QrCodeParameter extends \app\models\ModelActiveRecord |
|
20 |
{ |
|
21 |
/** |
|
22 |
* {@inheritdoc} |
|
23 |
*/ |
|
24 |
public static function tableName() |
|
25 |
{ |
|
26 |
return '{{%qr_code_parameter}}'; |
|
27 |
} |
|
28 |
|
|
29 |
/** |
|
30 |
* {@inheritdoc} |
|
31 |
*/ |
|
32 |
public function rules() |
|
33 |
{ |
|
34 |
return [ |
|
35 |
[['mall_id', 'user_id', 'data', 'created_at', 'path'], 'required'], |
|
36 |
[['mall_id', 'user_id', 'use_number'], 'integer'], |
|
37 |
[['data'], 'string'], |
|
38 |
[['created_at'], 'safe'], |
|
39 |
[['token'], 'string', 'max' => 30], |
|
40 |
[['path'], 'string', 'max' => 255], |
|
41 |
]; |
|
42 |
} |
|
43 |
|
|
44 |
/** |
|
45 |
* {@inheritdoc} |
|
46 |
*/ |
|
47 |
public function attributeLabels() |
|
48 |
{ |
|
49 |
return [ |
|
50 |
'id' => 'ID', |
|
51 |
'mall_id' => 'Mall ID', |
|
52 |
'user_id' => 'User ID', |
|
53 |
'token' => 'Token', |
|
54 |
'data' => 'Data', |
|
55 |
'created_at' => 'Created At', |
|
56 |
'path' => '小程序路径', |
|
57 |
'use_number' => '使用次数' |
|
58 |
]; |
|
59 |
} |
|
60 |
} |