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

/**
 * BaseCOM_DETALLE_PRESUP
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_detalle_presup
 * @property integer $id_rubro
 * @property integer $id_proyecto
 * @property integer $id_obj_gasto
 * @property decimal $valor_asignado
 * @property integer $id_anhos
 * @property OBJETOS_GASTO $OBJETOS_GASTO
 * @property PROYECTOS $PROYECTOS
 * @property PR_CODIF_PRESUP $PR_CODIF_PRESUP
 * 
 * @method integer            getIdDetallePresup()   Returns the current record's "id_detalle_presup" value
 * @method integer            getIdRubro()           Returns the current record's "id_rubro" value
 * @method integer            getIdProyecto()        Returns the current record's "id_proyecto" value
 * @method integer            getIdObjGasto()        Returns the current record's "id_obj_gasto" value
 * @method decimal            getValorAsignado()     Returns the current record's "valor_asignado" value
 * @method integer            getIdAnhos()           Returns the current record's "id_anhos" value
 * @method OBJETOS_GASTO      getOBJETOSGASTO()      Returns the current record's "OBJETOS_GASTO" value
 * @method PROYECTOS          getPROYECTOS()         Returns the current record's "PROYECTOS" value
 * @method PR_CODIF_PRESUP    getPRCODIFPRESUP()     Returns the current record's "PR_CODIF_PRESUP" value
 * @method COM_DETALLE_PRESUP setIdDetallePresup()   Sets the current record's "id_detalle_presup" value
 * @method COM_DETALLE_PRESUP setIdRubro()           Sets the current record's "id_rubro" value
 * @method COM_DETALLE_PRESUP setIdProyecto()        Sets the current record's "id_proyecto" value
 * @method COM_DETALLE_PRESUP setIdObjGasto()        Sets the current record's "id_obj_gasto" value
 * @method COM_DETALLE_PRESUP setValorAsignado()     Sets the current record's "valor_asignado" value
 * @method COM_DETALLE_PRESUP setIdAnhos()           Sets the current record's "id_anhos" value
 * @method COM_DETALLE_PRESUP setOBJETOSGASTO()      Sets the current record's "OBJETOS_GASTO" value
 * @method COM_DETALLE_PRESUP setPROYECTOS()         Sets the current record's "PROYECTOS" value
 * @method COM_DETALLE_PRESUP setPRCODIFPRESUP()     Sets the current record's "PR_CODIF_PRESUP" value
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCOM_DETALLE_PRESUP extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('COM_DETALLE_PRESUP');
        $this->hasColumn('id_detalle_presup', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_rubro', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_proyecto', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_obj_gasto', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_asignado', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_anhos', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('PROYECTOS', array(
             'local' => 'id_proyecto',
             'foreign' => 'id'));

        $this->hasOne('PR_CODIF_PRESUP', array(
             'local' => 'id_rubro',
             'foreign' => 'id_rubro'));
    }
}