<?php

/**
 * This is the model class for table "sidcai_analista_nota".
 *
 * The followings are the available columns in table 'sidcai_analista_nota':
 * @property integer $nota_codigo_pk
 * @property integer $usua_codigo_fk
 * @property string $nota_contenido
 * @property string $nota_fecha_actualizada
 *
 * The followings are the available model relations:
 * @property SidcaiUsuario $usuaCodigoFk
 */
class SidcaiAnalistaNota extends CActiveRecord{
	/**
	 * @return string the associated database table name
	 */
	public function tableName(){
		return 'sidcai_analista_nota';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules(){
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('usua_codigo_fk, nota_contenido, nota_fecha_actualizada', 'required'),
			array('usua_codigo_fk', 'numerical', 'integerOnly'=>true),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations(){
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
			'usuaCodigoFk' => array(self::BELONGS_TO, 'SidcaiUsuario', 'usua_codigo_fk'),
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels(){
		return array(
			'nota_codigo_pk' => 'Código',
			'usua_codigo_fk' => 'Usuario',
			'nota_contenido' => 'Contenido',
			'nota_fecha_actualizada' => 'Fecha Actualizada',
		);
	}

	/**
	 * Returns the static model of the specified AR class.
	 * Please note that you should have this exact method in all your CActiveRecord descendants!
	 * @param string $className active record class name.
	 * @return SidcaiAnalistaNota the static model class
	 */
	public static function model($className=__CLASS__){
		return parent::model($className);
	}
}
