我有一个模型:
class Service extends CActiveRecord
{
public static function model($className = __CLASS__)
{
return parent::model($className);
}
public static function getMainPageItems()
{
return self::model()->findAll(array(
'condition' => 'on_main = 1',
'order' => 'pos ASC'
));
public static function getNonMainPageItems()
{
return self::model()->findAll(array(
'condition' => 'on_main = 0',
'order' => 'pos ASC'
));
}
我想将模型的默认顺序设置为pos ASC
.
如何设置模型的默认顺序?