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 "{{%home_nav}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property int $mall_id |
|
12 |
* @property string $name 导航名称 |
|
13 |
* @property string $url 导航链接 |
|
14 |
* @property string $icon_url 导航图标 |
|
15 |
* @property string $sort 排序 |
|
16 |
* @property string $params 排序 |
|
17 |
* @property string $open_type 排序 |
|
18 |
* @property int $status 状态:0.隐藏|1.显示 |
|
19 |
* @property string $created_at |
|
20 |
* @property string $updated_at |
|
21 |
* @property string $deleted_at |
|
22 |
* @property int $is_delete |
|
23 |
* @property string $sign |
|
24 |
*/ |
|
25 |
class HomeNav extends ModelActiveRecord |
|
26 |
{ |
|
27 |
/** |
|
28 |
* {@inheritdoc} |
|
29 |
*/ |
|
30 |
public static function tableName() |
|
31 |
{ |
|
32 |
return '{{%home_nav}}'; |
|
33 |
} |
|
34 |
|
|
35 |
/** |
|
36 |
* {@inheritdoc} |
|
37 |
*/ |
|
38 |
public function rules() |
|
39 |
{ |
|
40 |
return [ |
|
41 |
[['mall_id', 'created_at', 'updated_at', 'deleted_at'], 'required'], |
|
42 |
[['mall_id', 'status', 'is_delete', 'sort'], 'integer'], |
|
43 |
[['created_at', 'updated_at', 'deleted_at', 'params'], 'safe'], |
|
44 |
[['name', 'open_type', 'sign'], 'string', 'max' => 65], |
|
45 |
[['url', 'icon_url'], 'string', 'max' => 255], |
|
46 |
]; |
|
47 |
} |
|
48 |
|
|
49 |
/** |
|
50 |
* {@inheritdoc} |
|
51 |
*/ |
|
52 |
public function attributeLabels() |
|
53 |
{ |
|
54 |
return [ |
|
55 |
'id' => 'ID', |
|
56 |
'mall_id' => '商城 ID', |
|
57 |
'name' => '导航名称', |
|
58 |
'url' => '导航链接', |
|
59 |
'icon_url' => '导航图标', |
|
60 |
'sort' => '排序', |
|
61 |
'open_type' => '链接类型', |
|
62 |
'params' => '导航属性', |
|
63 |
'status' => '导航状态', |
|
64 |
'created_at' => 'Created At', |
|
65 |
'updated_at' => 'Updated At', |
|
66 |
'deleted_at' => 'Deleted At', |
|
67 |
'is_delete' => 'Is Delete', |
|
68 |
'sign' => '插件标识', |
|
69 |
]; |
|
70 |
} |
|
71 |
} |