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

/**
 * BaseCA_DEBITO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_debito
 * @property integer $id_anhos
 * @property integer $id_punto_venta
 * @property integer $id_tipo_debito
 * @property integer $sec_debito
 * @property integer $id_mae_ter
 * @property timestamp $fecha_proceso
 * @property integer $dias_pago
 * @property decimal $valor_bruto
 * @property decimal $valor_iva
 * @property decimal $valor_dcto
 * @property decimal $porcen_dcto
 * @property decimal $valor_total
 * @property integer $id_mae_ter_ven
 * @property string $observaciones
 * @property integer $id_tip_mon
 * @property decimal $valor_moneda
 * @property decimal $trm_debito
 * @property integer $estado
 * @property timestamp $fecha_anu
 * @property string $motivo_anu
 * @property timestamp $periodo_ini
 * @property timestamp $periodo_fin
 * @property string $usuariolog
 * @property integer $id_pc_fp
 * @property ANHOS $ANHOS
 * @property CA_PUNTO_VENTA $CA_PUNTO_VENTA
 * @property CA_TIPO_DEBITO $CA_TIPO_DEBITO
 * @property CA_TIP_MON $CA_TIP_MON
 * @property INTERCEROS $INTERCEROS
 * @property INTERCEROS $INTERCEROS_6
 * @property Doctrine_Collection $CA_DEBITO_DETALLE
 * @property Doctrine_Collection $CA_DEBITO_REF
 * @property Doctrine_Collection $CA_VENCIMIENTOS
 * @property Doctrine_Collection $CA_SALDOS
 * @property TS_PC_FP $TS_PC_FP
 * 
 * @method integer             getIdDebito()          Returns the current record's "id_debito" value
 * @method integer             getIdAnhos()           Returns the current record's "id_anhos" value
 * @method integer             getIdPuntoVenta()      Returns the current record's "id_punto_venta" value
 * @method integer             getIdTipoDebito()      Returns the current record's "id_tipo_debito" value
 * @method integer             getSecDebito()         Returns the current record's "sec_debito" value
 * @method integer             getIdMaeTer()          Returns the current record's "id_mae_ter" value
 * @method timestamp           getFechaProceso()      Returns the current record's "fecha_proceso" value
 * @method integer             getDiasPago()          Returns the current record's "dias_pago" value
 * @method decimal             getValorBruto()        Returns the current record's "valor_bruto" value
 * @method decimal             getValorIva()          Returns the current record's "valor_iva" value
 * @method decimal             getValorDcto()         Returns the current record's "valor_dcto" value
 * @method decimal             getPorcenDcto()        Returns the current record's "porcen_dcto" value
 * @method decimal             getValorTotal()        Returns the current record's "valor_total" value
 * @method integer             getIdMaeTerVen()       Returns the current record's "id_mae_ter_ven" value
 * @method string              getObservaciones()     Returns the current record's "observaciones" value
 * @method integer             getIdTipMon()          Returns the current record's "id_tip_mon" value
 * @method decimal             getValorMoneda()       Returns the current record's "valor_moneda" value
 * @method decimal             getTrmDebito()         Returns the current record's "trm_debito" value
 * @method integer             getEstado()            Returns the current record's "estado" value
 * @method timestamp           getFechaAnu()          Returns the current record's "fecha_anu" value
 * @method string              getMotivoAnu()         Returns the current record's "motivo_anu" value
 * @method timestamp           getPeriodoIni()        Returns the current record's "periodo_ini" value
 * @method timestamp           getPeriodoFin()        Returns the current record's "periodo_fin" value
 * @method string              getUsuariolog()        Returns the current record's "usuariolog" value
 * @method integer             getIdPcFp()            Returns the current record's "id_pc_fp" value
 * @method ANHOS               getANHOS()             Returns the current record's "ANHOS" value
 * @method CA_PUNTO_VENTA      getCAPUNTOVENTA()      Returns the current record's "CA_PUNTO_VENTA" value
 * @method CA_TIPO_DEBITO      getCATIPODEBITO()      Returns the current record's "CA_TIPO_DEBITO" value
 * @method CA_TIP_MON          getCATIPMON()          Returns the current record's "CA_TIP_MON" value
 * @method INTERCEROS          getINTERCEROS()        Returns the current record's "INTERCEROS" value
 * @method INTERCEROS          getINTERCEROS6()       Returns the current record's "INTERCEROS_6" value
 * @method Doctrine_Collection getCADEBITODETALLE()   Returns the current record's "CA_DEBITO_DETALLE" collection
 * @method Doctrine_Collection getCADEBITOREF()       Returns the current record's "CA_DEBITO_REF" collection
 * @method Doctrine_Collection getCAVENCIMIENTOS()    Returns the current record's "CA_VENCIMIENTOS" collection
 * @method Doctrine_Collection getCASALDOS()          Returns the current record's "CA_SALDOS" collection
 * @method TS_PC_FP            getTSPCFP()            Returns the current record's "TS_PC_FP" value
 * @method CA_DEBITO           setIdDebito()          Sets the current record's "id_debito" value
 * @method CA_DEBITO           setIdAnhos()           Sets the current record's "id_anhos" value
 * @method CA_DEBITO           setIdPuntoVenta()      Sets the current record's "id_punto_venta" value
 * @method CA_DEBITO           setIdTipoDebito()      Sets the current record's "id_tipo_debito" value
 * @method CA_DEBITO           setSecDebito()         Sets the current record's "sec_debito" value
 * @method CA_DEBITO           setIdMaeTer()          Sets the current record's "id_mae_ter" value
 * @method CA_DEBITO           setFechaProceso()      Sets the current record's "fecha_proceso" value
 * @method CA_DEBITO           setDiasPago()          Sets the current record's "dias_pago" value
 * @method CA_DEBITO           setValorBruto()        Sets the current record's "valor_bruto" value
 * @method CA_DEBITO           setValorIva()          Sets the current record's "valor_iva" value
 * @method CA_DEBITO           setValorDcto()         Sets the current record's "valor_dcto" value
 * @method CA_DEBITO           setPorcenDcto()        Sets the current record's "porcen_dcto" value
 * @method CA_DEBITO           setValorTotal()        Sets the current record's "valor_total" value
 * @method CA_DEBITO           setIdMaeTerVen()       Sets the current record's "id_mae_ter_ven" value
 * @method CA_DEBITO           setObservaciones()     Sets the current record's "observaciones" value
 * @method CA_DEBITO           setIdTipMon()          Sets the current record's "id_tip_mon" value
 * @method CA_DEBITO           setValorMoneda()       Sets the current record's "valor_moneda" value
 * @method CA_DEBITO           setTrmDebito()         Sets the current record's "trm_debito" value
 * @method CA_DEBITO           setEstado()            Sets the current record's "estado" value
 * @method CA_DEBITO           setFechaAnu()          Sets the current record's "fecha_anu" value
 * @method CA_DEBITO           setMotivoAnu()         Sets the current record's "motivo_anu" value
 * @method CA_DEBITO           setPeriodoIni()        Sets the current record's "periodo_ini" value
 * @method CA_DEBITO           setPeriodoFin()        Sets the current record's "periodo_fin" value
 * @method CA_DEBITO           setUsuariolog()        Sets the current record's "usuariolog" value
 * @method CA_DEBITO           setIdPcFp()            Sets the current record's "id_pc_fp" value
 * @method CA_DEBITO           setANHOS()             Sets the current record's "ANHOS" value
 * @method CA_DEBITO           setCAPUNTOVENTA()      Sets the current record's "CA_PUNTO_VENTA" value
 * @method CA_DEBITO           setCATIPODEBITO()      Sets the current record's "CA_TIPO_DEBITO" value
 * @method CA_DEBITO           setCATIPMON()          Sets the current record's "CA_TIP_MON" value
 * @method CA_DEBITO           setINTERCEROS()        Sets the current record's "INTERCEROS" value
 * @method CA_DEBITO           setINTERCEROS6()       Sets the current record's "INTERCEROS_6" value
 * @method CA_DEBITO           setCADEBITODETALLE()   Sets the current record's "CA_DEBITO_DETALLE" collection
 * @method CA_DEBITO           setCADEBITOREF()       Sets the current record's "CA_DEBITO_REF" collection
 * @method CA_DEBITO           setCAVENCIMIENTOS()    Sets the current record's "CA_VENCIMIENTOS" collection
 * @method CA_DEBITO           setCASALDOS()          Sets the current record's "CA_SALDOS" collection
 * @method CA_DEBITO           setTSPCFP()            Sets the current record's "TS_PC_FP" value
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_DEBITO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_DEBITO');
        $this->hasColumn('id_debito', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_anhos', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_punto_venta', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tipo_debito', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('sec_debito', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_mae_ter', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_proceso', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_vencimiento', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('dias_pago', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_bruto', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('valor_iva', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('valor_dcto', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('porcen_dcto', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_total', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('id_mae_ter_ven', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('observaciones', 'string', 256, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 256,
             ));
        $this->hasColumn('id_tip_mon', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_moneda', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('trm_debito', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1 ',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_anu', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('motivo_anu', 'string', 256, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 256,
             ));
        $this->hasColumn('periodo_ini', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('periodo_fin', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('usuariolog', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_pr_tipo_ingre', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('usuario_anu', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('CA_PUNTO_VENTA', array(
             'local' => 'id_punto_venta',
             'foreign' => 'id_punto_venta'));

        $this->hasOne('CA_TIPO_DEBITO', array(
             'local' => 'id_tipo_debito',
             'foreign' => 'id_tipo_debito'));

        $this->hasOne('CA_TIP_MON', array(
             'local' => 'id_tip_mon',
             'foreign' => 'id_tip_mon'));

        $this->hasOne('INTERCEROS', array(
             'local' => 'id_mae_ter',
             'foreign' => 'id_mae_ter'));

        $this->hasOne('INTERCEROS as INTERCEROS_6', array(
             'local' => 'id_mae_ter_ven',
             'foreign' => 'id_mae_ter'));

        $this->hasMany('CA_DEBITO_DETALLE', array(
             'local' => 'id_debito',
             'foreign' => 'id_debito'));

        $this->hasMany('CA_DEBITO_REF', array(
             'local' => 'id_debito',
             'foreign' => 'id_debito'));

        $this->hasMany('CA_VENCIMIENTOS', array(
             'local' => 'id_debito',
             'foreign' => 'id_debito'));

        $this->hasMany('CA_SALDOS', array(
             'local' => 'id_debito',
             'foreign' => 'id_debito'));

        $this->hasOne('TS_PC_FP', array(
             'local' => 'id_pc_fp',
             'foreign' => 'id'));
        
        $this->hasOne('PR_TIPO_INGRE', array(
             'local' => 'id_pr_tipo_ingre',
             'foreign' => 'id'));
    }
}