<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('CA_PAGO_HISTORICO', 'doctrine');

/**
 * BaseCA_PAGO_HISTORICO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_pago_historico
 * @property integer $id_recibo
 * @property integer $vigencia
 * @property integer $valor_requerido
 * @property timestamp $fecha_requerido
 * @property integer $valor_pago
 * @property timestamp $fecha_pago
 * @property timestamp $fecha_anualidad
 * @property integer $area_liquidada
 * @property CA_RECIBO $CA_RECIBO
 * @property CA_RECIBO $CA_RECIBO_2
 * @property CA_RECIBO $CA_RECIBO_3
 * @property CA_RECIBO $CA_RECIBO_4
 * @property Doctrine_Collection $CA_FECHA_PAGO_HIST
 * 
 * @method integer             getIdPagoHistorico()    Returns the current record's "id_pago_historico" value
 * @method integer             getIdRecibo()           Returns the current record's "id_recibo" value
 * @method integer             getVigencia()           Returns the current record's "vigencia" value
 * @method integer             getValorRequerido()     Returns the current record's "valor_requerido" value
 * @method timestamp           getFechaRequerido()     Returns the current record's "fecha_requerido" value
 * @method integer             getValorPago()          Returns the current record's "valor_pago" value
 * @method timestamp           getFechaPago()          Returns the current record's "fecha_pago" value
 * @method timestamp           getFechaAnualidad()     Returns the current record's "fecha_anualidad" value
 * @method integer             getAreaLiquidada()      Returns the current record's "area_liquidada" value
 * @method CA_RECIBO           getCARECIBO()           Returns the current record's "CA_RECIBO" value
 * @method CA_RECIBO           getCARECIBO2()          Returns the current record's "CA_RECIBO_2" value
 * @method CA_RECIBO           getCARECIBO3()          Returns the current record's "CA_RECIBO_3" value
 * @method CA_RECIBO           getCARECIBO4()          Returns the current record's "CA_RECIBO_4" value
 * @method Doctrine_Collection getCAFECHAPAGOHIST()    Returns the current record's "CA_FECHA_PAGO_HIST" collection
 * @method CA_PAGO_HISTORICO   setIdPagoHistorico()    Sets the current record's "id_pago_historico" value
 * @method CA_PAGO_HISTORICO   setIdRecibo()           Sets the current record's "id_recibo" value
 * @method CA_PAGO_HISTORICO   setVigencia()           Sets the current record's "vigencia" value
 * @method CA_PAGO_HISTORICO   setValorRequerido()     Sets the current record's "valor_requerido" value
 * @method CA_PAGO_HISTORICO   setFechaRequerido()     Sets the current record's "fecha_requerido" value
 * @method CA_PAGO_HISTORICO   setValorPago()          Sets the current record's "valor_pago" value
 * @method CA_PAGO_HISTORICO   setFechaPago()          Sets the current record's "fecha_pago" value
 * @method CA_PAGO_HISTORICO   setFechaAnualidad()     Sets the current record's "fecha_anualidad" value
 * @method CA_PAGO_HISTORICO   setAreaLiquidada()      Sets the current record's "area_liquidada" value
 * @method CA_PAGO_HISTORICO   setCARECIBO()           Sets the current record's "CA_RECIBO" value
 * @method CA_PAGO_HISTORICO   setCARECIBO2()          Sets the current record's "CA_RECIBO_2" value
 * @method CA_PAGO_HISTORICO   setCARECIBO3()          Sets the current record's "CA_RECIBO_3" value
 * @method CA_PAGO_HISTORICO   setCARECIBO4()          Sets the current record's "CA_RECIBO_4" value
 * @method CA_PAGO_HISTORICO   setCAFECHAPAGOHIST()    Sets the current record's "CA_FECHA_PAGO_HIST" collection
 * 
 * @package    canon
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_PAGO_HISTORICO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_PAGO_HISTORICO');
        $this->hasColumn('id_pago_historico', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_recibo', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('vigencia', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('valor_requerido', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_requerido', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('valor_pago', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_pago', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_anualidad', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('area_liquidada', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('CA_RECIBO', array(
             'local' => 'id_recibo',
             'foreign' => 'id_recibo'));

        $this->hasOne('CA_RECIBO as CA_RECIBO_2', array(
             'local' => 'vigencia',
             'foreign' => 'id_recibo'));

        $this->hasOne('CA_RECIBO as CA_RECIBO_3', array(
             'local' => 'id_recibo',
             'foreign' => 'vigencia'));

        $this->hasOne('CA_RECIBO as CA_RECIBO_4', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

        $this->hasMany('CA_FECHA_PAGO_HIST', array(
             'local' => 'id_pago_historico',
             'foreign' => 'id_pago_historico'));
    }
}