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

/**
 * BasePR_ASIG_PRESUP
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $id_apropiacion
 * @property integer $id_cpo
 * @property integer $id_unidad
 * @property integer $asignacion
 * @property timestamp $fecha
 * @property string $usuario
 * @property integer $id_vigencia
 * @property string $vigencia
 * @property integer $id_anterior
 * @property PROYECTOS $PROYECTOS
 * @property PR_APROPIACION $PR_APROPIACION
 * @property VIGENCIA $VIGENCIA
 * @property Doctrine_Collection $PR_DETA_REIN
 * @property Doctrine_Collection $PR_CPO_ASIGN
 * @property Doctrine_Collection $PR_ASIGNACION_SALDOS
 * 
 * @method integer             getId()                   Returns the current record's "id" value
 * @method integer             getIdApropiacion()        Returns the current record's "id_apropiacion" value
 * @method integer             getIdCpo()                Returns the current record's "id_cpo" value
 * @method integer             getIdUnidad()             Returns the current record's "id_unidad" value
 * @method integer             getAsignacion()           Returns the current record's "asignacion" value
 * @method timestamp           getFecha()                Returns the current record's "fecha" value
 * @method string              getUsuario()              Returns the current record's "usuario" value
 * @method integer             getIdVigencia()           Returns the current record's "id_vigencia" value
 * @method string              getVigencia()             Returns the current record's "vigencia" value
 * @method integer             getIdAnterior()           Returns the current record's "id_anterior" value
 * @method PROYECTOS           getPROYECTOS()            Returns the current record's "PROYECTOS" value
 * @method PR_APROPIACION      getPRAPROPIACION()        Returns the current record's "PR_APROPIACION" value
 * @method VIGENCIA            getVIGENCIA()             Returns the current record's "VIGENCIA" value
 * @method Doctrine_Collection getPRDETAREIN()           Returns the current record's "PR_DETA_REIN" collection
 * @method Doctrine_Collection getPRCPOASIGN()           Returns the current record's "PR_CPO_ASIGN" collection
 * @method Doctrine_Collection getPRASIGNACIONSALDOS()   Returns the current record's "PR_ASIGNACION_SALDOS" collection
 * @method PR_ASIG_PRESUP      setId()                   Sets the current record's "id" value
 * @method PR_ASIG_PRESUP      setIdApropiacion()        Sets the current record's "id_apropiacion" value
 * @method PR_ASIG_PRESUP      setIdCpo()                Sets the current record's "id_cpo" value
 * @method PR_ASIG_PRESUP      setIdUnidad()             Sets the current record's "id_unidad" value
 * @method PR_ASIG_PRESUP      setAsignacion()           Sets the current record's "asignacion" value
 * @method PR_ASIG_PRESUP      setFecha()                Sets the current record's "fecha" value
 * @method PR_ASIG_PRESUP      setUsuario()              Sets the current record's "usuario" value
 * @method PR_ASIG_PRESUP      setIdVigencia()           Sets the current record's "id_vigencia" value
 * @method PR_ASIG_PRESUP      setVigencia()             Sets the current record's "vigencia" value
 * @method PR_ASIG_PRESUP      setIdAnterior()           Sets the current record's "id_anterior" value
 * @method PR_ASIG_PRESUP      setPROYECTOS()            Sets the current record's "PROYECTOS" value
 * @method PR_ASIG_PRESUP      setPRAPROPIACION()        Sets the current record's "PR_APROPIACION" value
 * @method PR_ASIG_PRESUP      setVIGENCIA()             Sets the current record's "VIGENCIA" value
 * @method PR_ASIG_PRESUP      setPRDETAREIN()           Sets the current record's "PR_DETA_REIN" collection
 * @method PR_ASIG_PRESUP      setPRCPOASIGN()           Sets the current record's "PR_CPO_ASIGN" collection
 * @method PR_ASIG_PRESUP      setPRASIGNACIONSALDOS()   Sets the current record's "PR_ASIGNACION_SALDOS" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_ASIG_PRESUP extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_ASIG_PRESUP');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_apropiacion', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_cpo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_unidad', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('asignacion', 'integer', 38, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 38,
             ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('usuario', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_vigencia', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('vigencia', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('id_anterior', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('PR_APROPIACION', array(
             'local' => 'id_apropiacion',
             'foreign' => 'id'));

        $this->hasOne('VIGENCIA', array(
             'local' => 'id_vigencia',
             'foreign' => 'id_vigencia'));

        $this->hasMany('PR_DETA_REIN', array(
             'local' => 'id',
             'foreign' => 'id_asig'));

        $this->hasMany('PR_CPO_ASIGN', array(
             'local' => 'id',
             'foreign' => 'id_asign'));

        $this->hasMany('PR_ASIGNACION_SALDOS', array(
             'local' => 'id',
             'foreign' => 'id_asign'));
    }
}