commit | author | age
|
90c639
|
1 |
<?php |
Z |
2 |
|
|
3 |
namespace app\models; |
|
4 |
|
|
5 |
use Yii; |
|
6 |
|
|
7 |
/** |
|
8 |
* This is the model class for table "{{%share_level}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property int $mall_id |
|
12 |
* @property int $level 分销等级1~100 |
|
13 |
* @property string $name 分销等级名称 |
|
14 |
* @property int $condition_type 升级条件:1--下线用户数|2--累计佣金|3--已提现佣金 |
|
15 |
* @property string $condition 下线用户数(人)|累计佣金数(元)|已提现佣金数(元) |
|
16 |
* @property int $price_type 分销佣金类型:1--百分比|2--固定金额 |
|
17 |
* @property string $first 一级分销佣金数(元) |
|
18 |
* @property int $status 是否启用 |
|
19 |
* @property int $is_delete |
|
20 |
* @property string $created_at |
|
21 |
* @property string $updated_at |
|
22 |
* @property string $deleted_at |
|
23 |
* @property string $second 二级分销佣金数(元) |
|
24 |
* @property string $third 三级分销佣金数(元) |
|
25 |
* @property int $is_auto_level 是否启用自动升级 |
|
26 |
* @property string $rule 等级说明 |
|
27 |
*/ |
|
28 |
class ShareLevel extends \app\models\ModelActiveRecord |
|
29 |
{ |
|
30 |
/** |
|
31 |
* {@inheritdoc} |
|
32 |
*/ |
|
33 |
public static function tableName() |
|
34 |
{ |
|
35 |
return '{{%share_level}}'; |
|
36 |
} |
|
37 |
|
|
38 |
/** |
|
39 |
* {@inheritdoc} |
|
40 |
*/ |
|
41 |
public function rules() |
|
42 |
{ |
|
43 |
return [ |
|
44 |
[['mall_id', 'created_at', 'updated_at', 'deleted_at'], 'required'], |
|
45 |
[['mall_id', 'level', 'condition_type', 'price_type', 'status', 'is_delete', 'is_auto_level'], 'integer'], |
|
46 |
[['condition', 'first', 'second', 'third'], 'number'], |
|
47 |
[['created_at', 'updated_at', 'deleted_at'], 'safe'], |
|
48 |
[['name', 'rule'], 'string', 'max' => 255], |
|
49 |
]; |
|
50 |
} |
|
51 |
|
|
52 |
/** |
|
53 |
* {@inheritdoc} |
|
54 |
*/ |
|
55 |
public function attributeLabels() |
|
56 |
{ |
|
57 |
return [ |
|
58 |
'id' => 'ID', |
|
59 |
'mall_id' => 'Mall ID', |
|
60 |
'level' => '分销等级1~5', |
|
61 |
'name' => '分销等级名称', |
|
62 |
'condition_type' => '升级条件:1--下线用户数|2--累计佣金|3--已提现佣金|4--累计消费', |
|
63 |
'condition' => '下线用户数(人)|累计佣金数(元)|已提现佣金数(元)|累计消费金额(元)', |
|
64 |
'price_type' => '分销佣金类型:1--百分比|2--固定金额', |
|
65 |
'first' => '一级分销佣金数(元)', |
|
66 |
'status' => '是否启用', |
|
67 |
'is_delete' => 'Is Delete', |
|
68 |
'created_at' => 'Created At', |
|
69 |
'updated_at' => 'Updated At', |
|
70 |
'deleted_at' => 'Deleted At', |
|
71 |
'second' => '二级分销佣金数(元)', |
|
72 |
'third' => '三级分销佣金数(元)', |
|
73 |
'is_auto_level' => '是否启用自动升级', |
|
74 |
'rule' => '等级说明', |
|
75 |
]; |
|
76 |
} |
|
77 |
} |