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

/**
 * BaseCA_FACTURA_PAGO
 * 
 * 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_PAGO setIdFacturaPago()   Sets the current record's "id_factura_pago" value
 * @method CA_FACTURA_PAGO setIdFactura()       Sets the current record's "id_factura" value
 * @method CA_FACTURA_PAGO setIdTsPcFp()        Sets the current record's "id_ts_pc_fp" value
 * @method CA_FACTURA_PAGO setValor()           Sets the current record's "valor" value
 * @method CA_FACTURA_PAGO setIdBn()            Sets the current record's "id_bn" value
 * @method CA_FACTURA_PAGO setIdCb()            Sets the current record's "id_cb" value
 * @method CA_FACTURA_PAGO setOficina()         Sets the current record's "oficina" value
 * @method CA_FACTURA_PAGO setNumDoc()          Sets the current record's "num_doc" value
 * @method CA_FACTURA_PAGO setFechaDoc()        Sets the current record's "fecha_doc" value
 * @method CA_FACTURA_PAGO setCAFACTURAPOS()    Sets the current record's "CA_FACTURA_POS" value
 * @method CA_FACTURA_PAGO setTSBN()            Sets the current record's "TS_BN" value
 * @method CA_FACTURA_PAGO setTSCB()            Sets the current record's "TS_CB" value
 * @method CA_FACTURA_PAGO setTSPCFP()          Sets the current record's "TS_PC_FP" value
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_FACTURA_PAGO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_FACTURA_PAGO');
        $this->hasColumn('id_factura_pago', 'integer', 8, array(
             'notnull' => false,
             '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_ts_pc_fp', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('valor', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('id_bn', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_cb', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('oficina', 'string', 45, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 45,
             ));
        $this->hasColumn('num_doc', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_doc', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
    }

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

        $this->hasOne('TS_BN', array(
             'local' => 'id_bn',
             'foreign' => 'id_bn'));

        $this->hasOne('TS_CB', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));

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