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

/**
 * BasePR_APROPIACION
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $id_rubro
 * @property integer $id_situac_rec
 * @property string $apropiacion
 * @property integer $id_fuente_finan
 * @property integer $id_tipo_rec
 * @property string $vigencia
 * @property string $previo_conc
 * @property string $usuario
 * @property integer $id_vigencia
 * @property timestamp $fechalog
 * @property integer $id_anterior
 * @property VIGENCIA $VIGENCIA
 * @property PR_FUENTE_FINAN $PR_FUENTE_FINAN
 * @property PR_SITUA_REC $PR_SITUA_REC
 * @property PR_CODIF_PRESUP $PR_CODIF_PRESUP
 * @property PR_TIPO_REC $PR_TIPO_REC
 * @property Doctrine_Collection $PR_PO_SALDOS
 * @property Doctrine_Collection $PR_NOVEDAD_APROPIACION
 * @property Doctrine_Collection $PR_ASIG_PRESUP
 * @property Doctrine_Collection $PR_ASIGNA_OBJ_GASTO
 * @property Doctrine_Collection $PR_APROP_NOVEDAD
 * 
 * @method integer             getId()                     Returns the current record's "id" value
 * @method integer             getIdRubro()                Returns the current record's "id_rubro" value
 * @method integer             getIdSituacRec()            Returns the current record's "id_situac_rec" value
 * @method string              getApropiacion()            Returns the current record's "apropiacion" value
 * @method integer             getIdFuenteFinan()          Returns the current record's "id_fuente_finan" value
 * @method integer             getIdTipoRec()              Returns the current record's "id_tipo_rec" value
 * @method string              getVigencia()               Returns the current record's "vigencia" value
 * @method string              getPrevioConc()             Returns the current record's "previo_conc" value
 * @method string              getUsuario()                Returns the current record's "usuario" value
 * @method integer             getIdVigencia()             Returns the current record's "id_vigencia" value
 * @method timestamp           getFechalog()               Returns the current record's "fechalog" value
 * @method integer             getIdAnterior()             Returns the current record's "id_anterior" value
 * @method VIGENCIA            getVIGENCIA()               Returns the current record's "VIGENCIA" value
 * @method PR_FUENTE_FINAN     getPRFUENTEFINAN()          Returns the current record's "PR_FUENTE_FINAN" value
 * @method PR_SITUA_REC        getPRSITUAREC()             Returns the current record's "PR_SITUA_REC" value
 * @method PR_CODIF_PRESUP     getPRCODIFPRESUP()          Returns the current record's "PR_CODIF_PRESUP" value
 * @method PR_TIPO_REC         getPRTIPOREC()              Returns the current record's "PR_TIPO_REC" value
 * @method Doctrine_Collection getPRPOSALDOS()             Returns the current record's "PR_PO_SALDOS" collection
 * @method Doctrine_Collection getPRNOVEDADAPROPIACION()   Returns the current record's "PR_NOVEDAD_APROPIACION" collection
 * @method Doctrine_Collection getPRASIGPRESUP()           Returns the current record's "PR_ASIG_PRESUP" collection
 * @method Doctrine_Collection getPRASIGNAOBJGASTO()       Returns the current record's "PR_ASIGNA_OBJ_GASTO" collection
 * @method Doctrine_Collection getPRAPROPNOVEDAD()         Returns the current record's "PR_APROP_NOVEDAD" collection
 * @method PR_APROPIACION      setId()                     Sets the current record's "id" value
 * @method PR_APROPIACION      setIdRubro()                Sets the current record's "id_rubro" value
 * @method PR_APROPIACION      setIdSituacRec()            Sets the current record's "id_situac_rec" value
 * @method PR_APROPIACION      setApropiacion()            Sets the current record's "apropiacion" value
 * @method PR_APROPIACION      setIdFuenteFinan()          Sets the current record's "id_fuente_finan" value
 * @method PR_APROPIACION      setIdTipoRec()              Sets the current record's "id_tipo_rec" value
 * @method PR_APROPIACION      setVigencia()               Sets the current record's "vigencia" value
 * @method PR_APROPIACION      setPrevioConc()             Sets the current record's "previo_conc" value
 * @method PR_APROPIACION      setUsuario()                Sets the current record's "usuario" value
 * @method PR_APROPIACION      setIdVigencia()             Sets the current record's "id_vigencia" value
 * @method PR_APROPIACION      setFechalog()               Sets the current record's "fechalog" value
 * @method PR_APROPIACION      setIdAnterior()             Sets the current record's "id_anterior" value
 * @method PR_APROPIACION      setVIGENCIA()               Sets the current record's "VIGENCIA" value
 * @method PR_APROPIACION      setPRFUENTEFINAN()          Sets the current record's "PR_FUENTE_FINAN" value
 * @method PR_APROPIACION      setPRSITUAREC()             Sets the current record's "PR_SITUA_REC" value
 * @method PR_APROPIACION      setPRCODIFPRESUP()          Sets the current record's "PR_CODIF_PRESUP" value
 * @method PR_APROPIACION      setPRTIPOREC()              Sets the current record's "PR_TIPO_REC" value
 * @method PR_APROPIACION      setPRPOSALDOS()             Sets the current record's "PR_PO_SALDOS" collection
 * @method PR_APROPIACION      setPRNOVEDADAPROPIACION()   Sets the current record's "PR_NOVEDAD_APROPIACION" collection
 * @method PR_APROPIACION      setPRASIGPRESUP()           Sets the current record's "PR_ASIG_PRESUP" collection
 * @method PR_APROPIACION      setPRASIGNAOBJGASTO()       Sets the current record's "PR_ASIGNA_OBJ_GASTO" collection
 * @method PR_APROPIACION      setPRAPROPNOVEDAD()         Sets the current record's "PR_APROP_NOVEDAD" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_APROPIACION extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_APROPIACION');
        $this->hasColumn('id', '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_situac_rec', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('apropiacion', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('id_fuente_finan', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tipo_rec', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('vigencia', 'string', 4, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $this->hasColumn('previo_conc', 'string', 1, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $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('fechalog', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $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('VIGENCIA', array(
             'local' => 'id_vigencia',
             'foreign' => 'id_vigencia'));

        $this->hasOne('PR_FUENTE_FINAN', array(
             'local' => 'id_fuente_finan',
             'foreign' => 'id'));

        $this->hasOne('PR_SITUA_REC', array(
             'local' => 'id_situac_rec',
             'foreign' => 'id'));

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

        $this->hasOne('PR_TIPO_REC', array(
             'local' => 'id_tipo_rec',
             'foreign' => 'id'));

        $this->hasMany('PR_PO_SALDOS', array(
             'local' => 'id',
             'foreign' => 'id_apropiacion'));

        $this->hasMany('PR_NOVEDAD_APROPIACION', array(
             'local' => 'id',
             'foreign' => 'id_apropiacion'));

        $this->hasMany('PR_ASIG_PRESUP', array(
             'local' => 'id',
             'foreign' => 'id_apropiacion'));

        $this->hasMany('PR_ASIGNA_OBJ_GASTO', array(
             'local' => 'id',
             'foreign' => 'id_apropiacion'));

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