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 "{{%store}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property int $mall_id |
|
12 |
* @property int $mch_id |
|
13 |
* @property string $name 店铺名称 |
|
14 |
* @property string $mobile 联系电话 |
|
15 |
* @property string $address 地址 |
|
16 |
* @property string $longitude 经度 |
|
17 |
* @property string $latitude 纬度 |
|
18 |
* @property int $score 店铺评分 |
|
19 |
* @property int $province_id 省ID |
|
20 |
* @property int $city_id 市ID |
|
21 |
* @property int $district_id 区ID |
|
22 |
* @property string $cover_url 店铺封面图 |
|
23 |
* @property string $pic_url 店铺轮播图 |
|
24 |
* @property string $business_hours 营业时间 |
|
25 |
* @property string $description 门店描述 |
|
26 |
* @property int $is_default 默认总店0.否|1.是 |
|
27 |
* @property int $scope 门店经营范围 |
|
28 |
* @property string $created_at |
|
29 |
* @property string $updated_at |
|
30 |
* @property string $deleted_at |
|
31 |
* @property int $is_delete |
|
32 |
* @property int $is_all_day |
|
33 |
* @property int $extra_attributes |
|
34 |
* @property int $status |
|
35 |
*/ |
|
36 |
class Store extends ModelActiveRecord |
|
37 |
{ |
|
38 |
/** |
|
39 |
* {@inheritdoc} |
|
40 |
*/ |
|
41 |
public static function tableName() |
|
42 |
{ |
|
43 |
return '{{%store}}'; |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* {@inheritdoc} |
|
48 |
*/ |
|
49 |
public function rules() |
|
50 |
{ |
|
51 |
return [ |
|
52 |
[['mall_id', 'description', 'created_at', 'updated_at', 'deleted_at', 'pic_url'], 'required'], |
|
53 |
[['mall_id', 'score', 'is_default', 'is_delete', 'mch_id', 'province_id', 'city_id', |
|
54 |
'district_id', 'is_all_day', 'status'], 'integer'], |
|
55 |
[['description', 'pic_url', 'scope'], 'string'], |
|
56 |
[['created_at', 'updated_at', 'deleted_at', 'extra_attributes'], 'safe'], |
|
57 |
[['name'], 'string', 'max' => 65], |
|
58 |
[['mobile', 'address', 'longitude', 'latitude', 'cover_url'], 'string', 'max' => 255], |
|
59 |
[['business_hours'], 'string', 'max' => 125], |
|
60 |
]; |
|
61 |
} |
|
62 |
|
|
63 |
/** |
|
64 |
* {@inheritdoc} |
|
65 |
*/ |
|
66 |
public function attributeLabels() |
|
67 |
{ |
|
68 |
return [ |
|
69 |
'id' => 'ID', |
|
70 |
'mall_id' => 'Mall ID', |
|
71 |
'mch_id' => 'Mch ID', |
|
72 |
'name' => '门店名称', |
|
73 |
'mobile' => '门店电话', |
|
74 |
'address' => '地址', |
|
75 |
'longitude' => '经度', |
|
76 |
'latitude' => '纬度', |
|
77 |
'score' => '店铺评分', |
|
78 |
'cover_url' => '店铺图片', |
|
79 |
'pic_url' => '店铺轮播图', |
|
80 |
'business_hours' => '营业时间', |
|
81 |
'description' => '店铺描述', |
|
82 |
'scope' => '门店经营范围', |
|
83 |
'is_default' => '是否默认门店', |
|
84 |
'created_at' => 'Created At', |
|
85 |
'updated_at' => 'Updated At', |
|
86 |
'deleted_at' => 'Deleted At', |
|
87 |
'is_delete' => 'Is Delete', |
|
88 |
'is_all_day' => '是否全天营业', |
|
89 |
'status' => '状态', |
|
90 |
]; |
|
91 |
} |
|
92 |
} |