<?php

/**
 * This is the model class for table "sidcai_ejercicio_fiscal".
 *
 * The followings are the available columns in table 'sidcai_ejercicio_fiscal':
 * @property integer $ejercicio_fiscal_pk
 * @property string $apor_diacierre
 * @property string $apor_mescierre
 * @property integer $apor_codigo_fk
 * @property string $fecha_actualizacion
 * @property string $estatus
 * @property integer $audit_usua
 * @property string $ejer_fechafin
 */
class SidcaiEjercicioFiscal extends CActiveRecord{
	/**
	 * @return string the associated database table name
	 */
	public function tableName(){
		return 'sidcai_ejercicio_fiscal';
	}

	/**
	 * @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(
				'apor_diacierre, apor_mescierre, apor_codigo_fk, fecha_actualizacion',
				'required',
				'message' => 'Este campo es requerido.'
			),
			array(
				'apor_codigo_fk, audit_usua', 
				'numerical', 
				'integerOnly' => true,
				'message' => 'Solo se permiten números.'
			),
			array(
				'apor_diacierre, apor_mescierre, fecha_actualizacion, estatus, ejer_fechafin', 
				'safe'
			),
		);
	}

	/**
	 * @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(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'ejercicio_fiscal_pk' => 'Ejercicio Fiscal Pk',
			'apor_diacierre' => 'Apor Diacierre',
			'apor_mescierre' => 'Apor Mescierre',
			'apor_codigo_fk' => 'Apor Codigo Fk',
			'fecha_actualizacion' => 'Fecha Actualizacion',
			'estatus' => 'Estatus',
			'audit_usua' => 'Audit Usua',
			'ejer_fechafin' => 'Ejer Fechafin',
		);
	}


	/**
	 * 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 SidcaiEjercicioFiscal the static model class
	 */
	public static function model($className=__CLASS__){
		return parent::model($className);
	}
}
