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 "{{%printer}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property int $mall_id |
|
12 |
* @property int $mch_id |
|
13 |
* @property string $type 类型 |
|
14 |
* @property string $name 名称 |
|
15 |
* @property string $setting 设置 |
|
16 |
* @property int $is_delete 删除 |
|
17 |
* @property string $created_at |
|
18 |
* @property string $updated_at |
|
19 |
* @property string $deleted_at |
|
20 |
*/ |
|
21 |
class Printer extends ModelActiveRecord |
|
22 |
{ |
|
23 |
const P_360_KDT2 = '360-kdt2'; |
|
24 |
const P_YILIANYUN_K4 = 'yilianyun-k4'; |
|
25 |
const P_FEIE = 'feie'; |
|
26 |
const P_GAINSCHA_GP = 'gainscha-gp'; |
|
27 |
|
|
28 |
/** |
|
29 |
* {@inheritdoc} |
|
30 |
*/ |
|
31 |
public static function tableName() |
|
32 |
{ |
|
33 |
return '{{%printer}}'; |
|
34 |
} |
|
35 |
|
|
36 |
/** |
|
37 |
* {@inheritdoc} |
|
38 |
*/ |
|
39 |
public function rules() |
|
40 |
{ |
|
41 |
return [ |
|
42 |
[['mall_id', 'type', 'name', 'setting', 'created_at', 'updated_at', 'deleted_at'], 'required'], |
|
43 |
[['mall_id', 'is_delete', 'mch_id'], 'integer'], |
|
44 |
[['setting'], 'string'], |
|
45 |
[['created_at', 'updated_at', 'deleted_at'], 'safe'], |
|
46 |
[['type', 'name'], 'string', 'max' => 255], |
|
47 |
]; |
|
48 |
} |
|
49 |
|
|
50 |
/** |
|
51 |
* {@inheritdoc} |
|
52 |
*/ |
|
53 |
public function attributeLabels() |
|
54 |
{ |
|
55 |
return [ |
|
56 |
'id' => 'ID', |
|
57 |
'mall_id' => 'Mall ID', |
|
58 |
'mch_id' => 'Mch ID', |
|
59 |
'type' => '类型', |
|
60 |
'name' => '名称', |
|
61 |
'setting' => '设置', |
|
62 |
'is_delete' => '删除', |
|
63 |
'created_at' => 'Created At', |
|
64 |
'updated_at' => 'Updated At', |
|
65 |
'deleted_at' => 'Deleted At', |
|
66 |
]; |
|
67 |
} |
|
68 |
} |