Commit 2740d958 by jomon

code review changes

parent fd16ddfb
......@@ -3,6 +3,7 @@
namespace common\models;
use Yii;
use common\models\query\CategoryQuery;
/**
* This is the model class for table "{{%category}}".
......@@ -24,6 +25,7 @@ class Category extends \yii\db\ActiveRecord
const STATUS_ACTIVE = 1;
const STATUS_NOT_ACTIVE = 2;
const STATUS_DELETED = 3;
/**
* @inheritdoc
*/
......
<?php
namespace common\models\query;
/**
* This is the ActiveQuery class for [[Category]].
*
* @see Category
*/
class CategoryQuery extends \yii\db\ActiveQuery
{
/*public function active()
{
return $this->andWhere('[[status]]=1');
}*/
/**
* @inheritdoc
* @return Category[]|array
*/
public function all($db = null)
{
return parent::all($db);
}
/**
* @inheritdoc
* @return Category|array|null
*/
public function one($db = null)
{
return parent::one($db);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment