<?php

// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('CA_FACTURA_RETEN', 'doctrine');

/**
 * BaseCA_FACTURA_RETEN
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_factura_pago
 * @property integer $id_factura
 * @property integer $id_ts_pc_fp
 * @property decimal $valor
 * @property integer $id_bn
 * @property integer $id_cb
 * @property string $oficina
 * @property string $num_doc
 * @property timestamp $fecha_doc
 * @property CA_FACTURA_POS $CA_FACTURA_POS
 * @property TS_BN $TS_BN
 * @property TS_CB $TS_CB
 * @property TS_PC_FP $TS_PC_FP
 * 
 * @method integer         getIdFacturaPago()   Returns the current record's "id_factura_pago" value
 * @method integer         getIdFactura()       Returns the current record's "id_factura" value
 * @method integer         getIdTsPcFp()        Returns the current record's "id_ts_pc_fp" value
 * @method decimal         getValor()           Returns the current record's "valor" value
 * @method integer         getIdBn()            Returns the current record's "id_bn" value
 * @method integer         getIdCb()            Returns the current record's "id_cb" value
 * @method string          getOficina()         Returns the current record's "oficina" value
 * @method string          getNumDoc()          Returns the current record's "num_doc" value
 * @method timestamp       getFechaDoc()        Returns the current record's "fecha_doc" value
 * @method CA_FACTURA_POS  getCAFACTURAPOS()    Returns the current record's "CA_FACTURA_POS" value
 * @method TS_BN           getTSBN()            Returns the current record's "TS_BN" value
 * @method TS_CB           getTSCB()            Returns the current record's "TS_CB" value
 * @method TS_PC_FP        getTSPCFP()          Returns the current record's "TS_PC_FP" value
 * @method CA_FACTURA_RETEN setIdFacturaPago()   Sets the current record's "id_factura_pago" value
 * @method CA_FACTURA_RETEN setIdFactura()       Sets the current record's "id_factura" value
 * @method CA_FACTURA_RETEN setIdTsPcFp()        Sets the current record's "id_ts_pc_fp" value
 * @method CA_FACTURA_RETEN setValor()           Sets the current record's "valor" value
 * @method CA_FACTURA_RETEN setIdBn()            Sets the current record's "id_bn" value
 * @method CA_FACTURA_RETEN setIdCb()            Sets the current record's "id_cb" value
 * @method CA_FACTURA_RETEN setOficina()         Sets the current record's "oficina" value
 * @method CA_FACTURA_RETEN setNumDoc()          Sets the current record's "num_doc" value
 * @method CA_FACTURA_RETEN setFechaDoc()        Sets the current record's "fecha_doc" value
 * @method CA_FACTURA_RETEN setCAFACTURAPOS()    Sets the current record's "CA_FACTURA_POS" value
 * @method CA_FACTURA_RETEN setTSBN()            Sets the current record's "TS_BN" value
 * @method CA_FACTURA_RETEN setTSCB()            Sets the current record's "TS_CB" value
 * @method CA_FACTURA_RETEN 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_FACTURA_RETEN extends sfDoctrineRecord {

    public function setTableDefinition() {
        $this->setTableName('CA_FACTURA_RETEN');
        $this->hasColumn('id_factura_reten', 'integer', 8, array(
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => true,
            'length' => 8,
        ));
        $this->hasColumn('id_factura', 'integer', 8, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 8,
        ));
        $this->hasColumn('id_im', 'integer', 8, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 8,
        ));
        $this->hasColumn('valor_base', 'decimal', 18, array(
            'notnull' => true,
            'type' => 'decimal',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '0 ',
            'primary' => false,
            'length' => 18,
        ));
        $this->hasColumn('porcentaje', 'integer', 8, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '0 ',
            'primary' => false,
            'length' => 8,
        ));
        $this->hasColumn('valor_retencion', 'decimal', 18, array(
            'notnull' => true,
            'type' => 'decimal',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '0 ',
            'primary' => false,
            'length' => 18,
        ));
    }

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

}