-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5f0ef49
commit 7ed397e
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?php | ||
|
||
namespace common\models; | ||
|
||
use Yii; | ||
|
||
/** | ||
* This is the model class for table "{{%static_pages}}". | ||
* | ||
* @property integer $id | ||
* @property string $title | ||
* @property string $alias | ||
* @property integer $published | ||
* @property string $content | ||
* @property string $title_browser | ||
* @property string $meta_keywords | ||
* @property string $meta_description | ||
* @property string $created_at | ||
* @property string $updated_at | ||
*/ | ||
class StaticPages extends \yii\db\ActiveRecord | ||
{ | ||
/** | ||
* @inheritdoc | ||
*/ | ||
public static function tableName() | ||
{ | ||
return '{{%static_pages}}'; | ||
} | ||
|
||
/** | ||
* @inheritdoc | ||
*/ | ||
public function rules() | ||
{ | ||
return [ | ||
[['title', 'alias'], 'required'], | ||
[['published'], 'integer'], | ||
[['content'], 'string'], | ||
[['created_at', 'updated_at'], 'safe'], | ||
[['title', 'alias', 'title_browser'], 'string', 'max' => 255], | ||
[['meta_keywords'], 'string', 'max' => 200], | ||
[['meta_description'], 'string', 'max' => 160], | ||
[['alias'], 'unique'], | ||
]; | ||
} | ||
|
||
|
||
} |