<?php

/**
 * This is the model class for table "sidcai_credito_fiscal".
 *
 * The followings are the available columns in table 'sidcai_credito_fiscal':
 * @property integer $cred_codigo_pk
 * @property integer $apor_codigo_fk
 * @property integer $decl_codigo_fk_origen
 * @property string $cred_monto
 * @property integer $decl_codigo_fk_destino
 * @property string $cred_fecha
 * @property boolean $cred_habilitado
 */
class SidcaiCreditoFiscal extends CActiveRecord{
	/**
	 * @return string the associated database table name
	 */
	public function tableName(){
		return 'sidcai_credito_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_codigo_fk, decl_codigo_fk_origen, cred_monto, cred_fecha', 'required'),
			array('apor_codigo_fk, decl_codigo_fk_origen, decl_codigo_fk_destino', 'numerical', 'integerOnly'=>true),
			array('cred_monto', 'length', 'max'=>25),
			array('cred_habilitado', '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(
			'cred_codigo_pk' => 'Id',
			'apor_codigo_fk' => 'Aportante',
			'decl_codigo_fk_origen' => 'Declaración Origen',
			'cred_monto' => 'Cred Monto',
			'decl_codigo_fk_destino' => 'Declaración Destino',
			'cred_fecha' => 'Fecha',
			'cred_habilitado' => 'Habilitado',
		);
	}
	
	/**
	 * 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 SidcaiCreditoFiscal the static model class
	 */
	public static function model($className=__CLASS__)
	{
		return parent::model($className);
	}
}
