Skip to content

Commit

Permalink
add static pages model
Browse files Browse the repository at this point in the history
  • Loading branch information
malder1975 committed Oct 3, 2016
1 parent 5f0ef49 commit 7ed397e
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions common/models/StaticPages.php
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'],
];
}


}

0 comments on commit 7ed397e

Please sign in to comment.