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 "{{%article}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property int $mall_id |
|
12 |
* @property int $article_cat_id 分类id:1=关于我们,2=服务中心 , 3=拼团 |
|
13 |
* @property string $title 标题 |
|
14 |
* @property string $content 内容 |
|
15 |
* @property int $sort 排序 |
|
16 |
* @property int $status 状态 |
|
17 |
* @property int $is_delete 删除 |
|
18 |
* @property string $deleted_at 删除时间 |
|
19 |
* @property string $created_at 创建时间 |
|
20 |
* @property string $updated_at 更新时间 |
|
21 |
*/ |
|
22 |
class Article extends ModelActiveRecord |
|
23 |
{ |
|
24 |
/** |
|
25 |
* {@inheritdoc} |
|
26 |
*/ |
|
27 |
public static function tableName() |
|
28 |
{ |
|
29 |
return '{{%article}}'; |
|
30 |
} |
|
31 |
|
|
32 |
/** |
|
33 |
* {@inheritdoc} |
|
34 |
*/ |
|
35 |
public function rules() |
|
36 |
{ |
|
37 |
return [ |
|
38 |
[['mall_id', 'article_cat_id', 'sort', 'is_delete', 'status'], 'integer'], |
|
39 |
[['article_cat_id', 'content', 'deleted_at', 'created_at', 'updated_at'], 'required'], |
|
40 |
[['content'], 'string'], |
|
41 |
[['deleted_at', 'created_at', 'updated_at'], 'safe'], |
|
42 |
[['title'], 'string', 'max' => 255], |
|
43 |
]; |
|
44 |
} |
|
45 |
|
|
46 |
/** |
|
47 |
* {@inheritdoc} |
|
48 |
*/ |
|
49 |
public function attributeLabels() |
|
50 |
{ |
|
51 |
return [ |
|
52 |
'id' => 'ID', |
|
53 |
'mall_id' => 'mall ID', |
|
54 |
'article_cat_id' => '分类id:1=关于我们,2=服务中心 , 3=拼团', |
|
55 |
'status' => '状态', |
|
56 |
'title' => '标题', |
|
57 |
'content' => '内容', |
|
58 |
'sort' => '排序', |
|
59 |
'is_delete' => '删除', |
|
60 |
'deleted_at' => '删除时间', |
|
61 |
'created_at' => '创建时间', |
|
62 |
'updated_at' => '更新时间', |
|
63 |
]; |
|
64 |
} |
|
65 |
} |