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

/**
 * BaseCBR_PLANIFICA_FP
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_planifica_fp
 * @property integer $id_facilidad_pago
 * @property timestamp $fecha_inicio
 * @property decimal $valor_total
 * @property integer $numero_cuotas
 * @property CBR_FACILIDAD_PAGO $CBR_FACILIDAD_PAGO
 * @property Doctrine_Collection $CBR_DETALLE_PAGO
 * @property Doctrine_Collection $CBR_DETALLE_CUOTA
 * 
 * @method integer             getIdPlanificaFp()      Returns the current record's "id_planifica_fp" value
 * @method integer             getIdFacilidadPago()    Returns the current record's "id_facilidad_pago" value
 * @method timestamp           getFechaInicio()        Returns the current record's "fecha_inicio" value
 * @method decimal             getValorTotal()         Returns the current record's "valor_total" value
 * @method integer             getNumeroCuotas()       Returns the current record's "numero_cuotas" value
 * @method CBR_FACILIDAD_PAGO  getCBRFACILIDADPAGO()   Returns the current record's "CBR_FACILIDAD_PAGO" value
 * @method Doctrine_Collection getCBRDETALLEPAGO()     Returns the current record's "CBR_DETALLE_PAGO" collection
 * @method Doctrine_Collection getCBRDETALLECUOTA()    Returns the current record's "CBR_DETALLE_CUOTA" collection
 * @method CBR_PLANIFICA_FP    setIdPlanificaFp()      Sets the current record's "id_planifica_fp" value
 * @method CBR_PLANIFICA_FP    setIdFacilidadPago()    Sets the current record's "id_facilidad_pago" value
 * @method CBR_PLANIFICA_FP    setFechaInicio()        Sets the current record's "fecha_inicio" value
 * @method CBR_PLANIFICA_FP    setValorTotal()         Sets the current record's "valor_total" value
 * @method CBR_PLANIFICA_FP    setNumeroCuotas()       Sets the current record's "numero_cuotas" value
 * @method CBR_PLANIFICA_FP    setCBRFACILIDADPAGO()   Sets the current record's "CBR_FACILIDAD_PAGO" value
 * @method CBR_PLANIFICA_FP    setCBRDETALLEPAGO()     Sets the current record's "CBR_DETALLE_PAGO" collection
 * @method CBR_PLANIFICA_FP    setCBRDETALLECUOTA()    Sets the current record's "CBR_DETALLE_CUOTA" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCBR_PLANIFICA_FP extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CBR_PLANIFICA_FP');
        $this->hasColumn('id_planifica_fp', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_facilidad_pago', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_inicio', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('valor_total', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('numero_cuotas', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasMany('CBR_DETALLE_PAGO', array(
             'local' => 'id_planifica_fp',
             'foreign' => 'id_planifica_fp'));

        $this->hasMany('CBR_DETALLE_CUOTA', array(
             'local' => 'id_planifica_fp',
             'foreign' => 'id_planifica_fp'));
    }
}