commit | author | age
|
2207d6
|
1 |
<?php |
W |
2 |
|
|
3 |
namespace app\models; |
|
4 |
|
|
5 |
use Yii; |
|
6 |
use app\models\ModelActiveRecord; |
|
7 |
|
|
8 |
/** |
|
9 |
* This is the model class for table "{{%city_service}}". |
|
10 |
* |
|
11 |
* @property int $id |
|
12 |
* @property int $mall_id |
|
13 |
* @property string $name 配送名称 |
|
14 |
* @property string $data |
|
15 |
* @property string $platform 所属平台 |
|
16 |
* @property string $service_type |
|
17 |
* @property int $distribution_corporation 配送公司 1.顺丰|2.闪送|3.美团配送|4.达达 |
|
18 |
* @property string $shop_no 门店编号 |
|
19 |
* @property string $created_at |
|
20 |
* @property int $is_delete |
|
21 |
*/ |
|
22 |
class CityService extends ModelActiveRecord |
|
23 |
{ |
|
24 |
/** |
|
25 |
* {@inheritdoc} |
|
26 |
*/ |
|
27 |
public static function tableName() |
|
28 |
{ |
|
29 |
return '{{%city_service}}'; |
|
30 |
} |
|
31 |
|
|
32 |
/** |
|
33 |
* {@inheritdoc} |
|
34 |
*/ |
|
35 |
public function rules() |
|
36 |
{ |
|
37 |
return [ |
|
38 |
[['mall_id', 'name', 'distribution_corporation', 'platform', 'service_type'], 'required'], |
|
39 |
[['id', 'mall_id', 'distribution_corporation', 'is_delete'], 'integer'], |
|
40 |
[['created_at'], 'safe'], |
|
41 |
[['name', 'shop_no', 'platform', 'service_type'], 'string', 'max' => 255], |
|
42 |
[['data'], 'string'], |
|
43 |
[['id'], 'unique'], |
|
44 |
]; |
|
45 |
} |
|
46 |
|
|
47 |
/** |
|
48 |
* {@inheritdoc} |
|
49 |
*/ |
|
50 |
public function attributeLabels() |
|
51 |
{ |
|
52 |
return [ |
|
53 |
'id' => 'ID', |
|
54 |
'mall_id' => 'Mall ID', |
|
55 |
'platform' => '所属平台', |
|
56 |
'name' => '配送名称', |
|
57 |
'distribution_corporation' => '配送公司 1.顺丰|2.闪送|3.美团配送|4.达达', |
|
58 |
'shop_no' => '门店编号', |
|
59 |
'created_at' => 'Created At', |
|
60 |
'is_delete' => 'Is Delete', |
|
61 |
]; |
|
62 |
} |
|
63 |
} |