<?php
/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of ForumThread
 *
 * @author yzxh24
 */
class ForumThread extends BaseActiveRecord
{
    /**
     * @return ForumThread
     */
    public static function model($className = __CLASS__)
    {
        return parent::model($className);
    }

    public function tableName()
    {
        return 'cdb_threads';
    }

    public function rules()
    {
        return array();
    }

    public function scopes()
    {
        return array(
			'digest' => array(
				'condition' => 't.digest=1',
			),
            'new' => array(
                'order' => 't.dateline DESC',
            ),
            'stick' => array(
                'order' => 't.displayorder DESC',
            ),
		);
    }
}