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 "{{%admin_notice}}". |
|
9 |
* |
|
10 |
* @property int $id |
|
11 |
* @property int $user_id |
|
12 |
* @property string $type update更新urgent紧急important重要 |
|
13 |
* @property string $content |
|
14 |
* @property int $is_delete |
|
15 |
* @property string $created_at |
|
16 |
* @property string $updated_at |
|
17 |
* @property string $deleted_at |
|
18 |
*/ |
|
19 |
class AdminNotice extends \app\models\ModelActiveRecord |
|
20 |
{ |
|
21 |
/** |
|
22 |
* {@inheritdoc} |
|
23 |
*/ |
|
24 |
public static function tableName() |
|
25 |
{ |
|
26 |
return '{{%admin_notice}}'; |
|
27 |
} |
|
28 |
|
|
29 |
/** |
|
30 |
* {@inheritdoc} |
|
31 |
*/ |
|
32 |
public function rules() |
|
33 |
{ |
|
34 |
return [ |
|
35 |
[['user_id', 'is_delete'], 'integer'], |
|
36 |
[['content'], 'required'], |
|
37 |
[['content', 'type'], 'string'], |
|
38 |
[['created_at', 'updated_at', 'deleted_at'], 'safe'], |
|
39 |
]; |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* {@inheritdoc} |
|
44 |
*/ |
|
45 |
public function attributeLabels() |
|
46 |
{ |
|
47 |
return [ |
|
48 |
'id' => 'ID', |
|
49 |
'user_id' => 'User ID', |
|
50 |
'type' => 'update更新urgent紧急important重要', |
|
51 |
'content' => 'Content', |
|
52 |
'is_delete' => 'Is Delete', |
|
53 |
'created_at' => 'Created At', |
|
54 |
'updated_at' => 'Updated At', |
|
55 |
'deleted_at' => 'Deleted At', |
|
56 |
]; |
|
57 |
} |
|
58 |
} |