<?php

/**
 * Description of ExcerptRecord
 *
 * @author ain
 */

class TypeResultRecord extends CActiveRecord {

	public function rules() {
		return array(
			array('avgdowntime', 'numerical', 'integerOnly' => true, 'min' => 1, 'max' => 500, 'allowEmpty' => false),
			array('keypermin', 'numerical', 'integerOnly' => true, 'min' => 1, 'max' => 1000, 'allowEmpty' => false),
			array('symbolpermin', 'numerical', 'integerOnly' => true, 'min' => 1, 'max' => 1000, 'allowEmpty' => false),
			array('correctsymbolpermin', 'numerical', 'integerOnly' => true, 'min' => 1, 'max' => 1000, 'allowEmpty' => false),
			array('avgpairtime', 'numerical', 'integerOnly' => true, 'min' => 1, 'max' => 1000, 'allowEmpty' => false),
			array('medianpairtime', 'numerical', 'integerOnly' => true, 'min' => 1, 'max' => 1000, 'allowEmpty' => false),
		);
	}

	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return '{{typeresult}}';
	}

	public function primaryKey() {
		return 'code';
	}

	/**
	 * Returns the static model of the specified AR class.
	 * @return CActiveRecord the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}
}

