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

/**
 * BaseCA_RECIBO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_recibo
 * @property integer $vigencia
 * @property integer $id_det_liq_canon
 * @property integer $vig_liq
 * @property integer $num_recibo
 * @property timestamp $fecha_exped_rec
 * @property timestamp $fecha_vence_rec
 * @property timestamp $fecha_pago_oportuno
 * @property timestamp $fecha_anula
 * @property integer $pago
 * @property integer $id_usuario_anula
 * @property integer $anulado
 * @property integer $historico
 * @property integer $id_debito
 * @property integer $sec_debito
 * @property CA_DET_LIQ_CANON $CA_DET_LIQ_CANON
 * @property CA_DET_LIQ_CANON $CA_DET_LIQ_CANON_2
 * @property CA_DET_LIQ_CANON $CA_DET_LIQ_CANON_3
 * @property CA_DET_LIQ_CANON $CA_DET_LIQ_CANON_4
 * @property CA_USUARIO $CA_USUARIO
 * @property Doctrine_Collection $CA_PAGO_HISTORICO
 * @property Doctrine_Collection $CA_PAGO_HISTORICO_2
 * @property Doctrine_Collection $CA_PAGO_HISTORICO_3
 * @property Doctrine_Collection $CA_PAGO_HISTORICO_4
 * 
 * @method integer             getIdRecibo()            Returns the current record's "id_recibo" value
 * @method integer             getVigencia()            Returns the current record's "vigencia" value
 * @method integer             getIdDetLiqCanon()       Returns the current record's "id_det_liq_canon" value
 * @method integer             getVigLiq()              Returns the current record's "vig_liq" value
 * @method integer             getNumRecibo()           Returns the current record's "num_recibo" value
 * @method timestamp           getFechaExpedRec()       Returns the current record's "fecha_exped_rec" value
 * @method timestamp           getFechaVenceRec()       Returns the current record's "fecha_vence_rec" value
 * @method timestamp           getFechaPagoOportuno()   Returns the current record's "fecha_pago_oportuno" value
 * @method timestamp           getFechaAnula()          Returns the current record's "fecha_anula" value
 * @method integer             getPago()                Returns the current record's "pago" value
 * @method integer             getIdUsuarioAnula()      Returns the current record's "id_usuario_anula" value
 * @method integer             getAnulado()             Returns the current record's "anulado" value
 * @method integer             getHistorico()           Returns the current record's "historico" value
 * @method integer             getIdDebito()            Returns the current record's "id_debito" value
 * @method integer             getSecDebito()           Returns the current record's "sec_debito" value
 * @method CA_DET_LIQ_CANON    getCADETLIQCANON()       Returns the current record's "CA_DET_LIQ_CANON" value
 * @method CA_DET_LIQ_CANON    getCADETLIQCANON2()      Returns the current record's "CA_DET_LIQ_CANON_2" value
 * @method CA_DET_LIQ_CANON    getCADETLIQCANON3()      Returns the current record's "CA_DET_LIQ_CANON_3" value
 * @method CA_DET_LIQ_CANON    getCADETLIQCANON4()      Returns the current record's "CA_DET_LIQ_CANON_4" value
 * @method CA_USUARIO          getCAUSUARIO()           Returns the current record's "CA_USUARIO" value
 * @method Doctrine_Collection getCAPAGOHISTORICO()     Returns the current record's "CA_PAGO_HISTORICO" collection
 * @method Doctrine_Collection getCAPAGOHISTORICO2()    Returns the current record's "CA_PAGO_HISTORICO_2" collection
 * @method Doctrine_Collection getCAPAGOHISTORICO3()    Returns the current record's "CA_PAGO_HISTORICO_3" collection
 * @method Doctrine_Collection getCAPAGOHISTORICO4()    Returns the current record's "CA_PAGO_HISTORICO_4" collection
 * @method CA_RECIBO           setIdRecibo()            Sets the current record's "id_recibo" value
 * @method CA_RECIBO           setVigencia()            Sets the current record's "vigencia" value
 * @method CA_RECIBO           setIdDetLiqCanon()       Sets the current record's "id_det_liq_canon" value
 * @method CA_RECIBO           setVigLiq()              Sets the current record's "vig_liq" value
 * @method CA_RECIBO           setNumRecibo()           Sets the current record's "num_recibo" value
 * @method CA_RECIBO           setFechaExpedRec()       Sets the current record's "fecha_exped_rec" value
 * @method CA_RECIBO           setFechaVenceRec()       Sets the current record's "fecha_vence_rec" value
 * @method CA_RECIBO           setFechaPagoOportuno()   Sets the current record's "fecha_pago_oportuno" value
 * @method CA_RECIBO           setFechaAnula()          Sets the current record's "fecha_anula" value
 * @method CA_RECIBO           setPago()                Sets the current record's "pago" value
 * @method CA_RECIBO           setIdUsuarioAnula()      Sets the current record's "id_usuario_anula" value
 * @method CA_RECIBO           setAnulado()             Sets the current record's "anulado" value
 * @method CA_RECIBO           setHistorico()           Sets the current record's "historico" value
 * @method CA_RECIBO           setIdDebito()            Sets the current record's "id_debito" value
 * @method CA_RECIBO           setSecDebito()           Sets the current record's "sec_debito" value
 * @method CA_RECIBO           setCADETLIQCANON()       Sets the current record's "CA_DET_LIQ_CANON" value
 * @method CA_RECIBO           setCADETLIQCANON2()      Sets the current record's "CA_DET_LIQ_CANON_2" value
 * @method CA_RECIBO           setCADETLIQCANON3()      Sets the current record's "CA_DET_LIQ_CANON_3" value
 * @method CA_RECIBO           setCADETLIQCANON4()      Sets the current record's "CA_DET_LIQ_CANON_4" value
 * @method CA_RECIBO           setCAUSUARIO()           Sets the current record's "CA_USUARIO" value
 * @method CA_RECIBO           setCAPAGOHISTORICO()     Sets the current record's "CA_PAGO_HISTORICO" collection
 * @method CA_RECIBO           setCAPAGOHISTORICO2()    Sets the current record's "CA_PAGO_HISTORICO_2" collection
 * @method CA_RECIBO           setCAPAGOHISTORICO3()    Sets the current record's "CA_PAGO_HISTORICO_3" collection
 * @method CA_RECIBO           setCAPAGOHISTORICO4()    Sets the current record's "CA_PAGO_HISTORICO_4" 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_RECIBO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_RECIBO');
        $this->hasColumn('id_recibo', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('vigencia', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_det_liq_canon', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('vig_liq', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('num_recibo', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_exped_rec', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_vence_rec', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_pago_oportuno', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_anula', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('pago', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_usuario_anula', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('anulado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('historico', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_debito', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('sec_debito', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cod_bar', 'string', 150, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 150,
             ));
    }

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

        $this->hasOne('CA_DET_LIQ_CANON as CA_DET_LIQ_CANON_2', array(
             'local' => 'vig_liq',
             'foreign' => 'id_det_liq_canon'));

        $this->hasOne('CA_DET_LIQ_CANON as CA_DET_LIQ_CANON_3', array(
             'local' => 'id_det_liq_canon',
             'foreign' => 'vigencia'));

        $this->hasOne('CA_DET_LIQ_CANON as CA_DET_LIQ_CANON_4', array(
             'local' => 'vig_liq',
             'foreign' => 'vigencia'));

        $this->hasOne('CA_USUARIO', array(
             'local' => 'id_usuario_anula',
             'foreign' => 'id_usuario'));

        $this->hasMany('CA_PAGO_HISTORICO', array(
             'local' => 'id_recibo',
             'foreign' => 'id_recibo'));

        $this->hasMany('CA_PAGO_HISTORICO as CA_PAGO_HISTORICO_2', array(
             'local' => 'id_recibo',
             'foreign' => 'vigencia'));

        $this->hasMany('CA_PAGO_HISTORICO as CA_PAGO_HISTORICO_3', array(
             'local' => 'vigencia',
             'foreign' => 'id_recibo'));

        $this->hasMany('CA_PAGO_HISTORICO as CA_PAGO_HISTORICO_4', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));
    }
}