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

/**
 * BasePR_CODIF_PRESUP
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_rubro
 * @property integer $id_clase_presup
 * @property integer $cod_rub1
 * @property integer $cod_rub2
 * @property integer $cod_rub3
 * @property integer $cod_rub4
 * @property integer $cod_rub5
 * @property string $descripcion
 * @property string $vigencia
 * @property integer $id_anterior
 * @property PR_CLASES_PRESUP $PR_CLASES_PRESUP
 * @property PR_PROG_GEN $PR_PROG_GEN
 * @property Doctrine_Collection $RH_NP_CON_NOM
 * @property Doctrine_Collection $PR_APROPIACION
 * @property Doctrine_Collection $NO_CONCEP_NOMINA
 * 
 * @method integer             getIdRubro()          Returns the current record's "id_rubro" value
 * @method integer             getIdClasePresup()    Returns the current record's "id_clase_presup" value
 * @method integer             getCodRub1()          Returns the current record's "cod_rub1" value
 * @method integer             getCodRub2()          Returns the current record's "cod_rub2" value
 * @method integer             getCodRub3()          Returns the current record's "cod_rub3" value
 * @method integer             getCodRub4()          Returns the current record's "cod_rub4" value
 * @method integer             getCodRub5()          Returns the current record's "cod_rub5" value
 * @method string              getDescripcion()      Returns the current record's "descripcion" value
 * @method string              getVigencia()         Returns the current record's "vigencia" value
 * @method integer             getIdAnterior()       Returns the current record's "id_anterior" value
 * @method PR_CLASES_PRESUP    getPRCLASESPRESUP()   Returns the current record's "PR_CLASES_PRESUP" value
 * @method PR_PROG_GEN         getPRPROGGEN()        Returns the current record's "PR_PROG_GEN" value
 * @method Doctrine_Collection getRHNPCONNOM()       Returns the current record's "RH_NP_CON_NOM" collection
 * @method Doctrine_Collection getPRAPROPIACION()    Returns the current record's "PR_APROPIACION" collection
 * @method Doctrine_Collection getNOCONCEPNOMINA()   Returns the current record's "NO_CONCEP_NOMINA" collection
 * @method PR_CODIF_PRESUP     setIdRubro()          Sets the current record's "id_rubro" value
 * @method PR_CODIF_PRESUP     setIdClasePresup()    Sets the current record's "id_clase_presup" value
 * @method PR_CODIF_PRESUP     setCodRub1()          Sets the current record's "cod_rub1" value
 * @method PR_CODIF_PRESUP     setCodRub2()          Sets the current record's "cod_rub2" value
 * @method PR_CODIF_PRESUP     setCodRub3()          Sets the current record's "cod_rub3" value
 * @method PR_CODIF_PRESUP     setCodRub4()          Sets the current record's "cod_rub4" value
 * @method PR_CODIF_PRESUP     setCodRub5()          Sets the current record's "cod_rub5" value
 * @method PR_CODIF_PRESUP     setDescripcion()      Sets the current record's "descripcion" value
 * @method PR_CODIF_PRESUP     setVigencia()         Sets the current record's "vigencia" value
 * @method PR_CODIF_PRESUP     setIdAnterior()       Sets the current record's "id_anterior" value
 * @method PR_CODIF_PRESUP     setPRCLASESPRESUP()   Sets the current record's "PR_CLASES_PRESUP" value
 * @method PR_CODIF_PRESUP     setPRPROGGEN()        Sets the current record's "PR_PROG_GEN" value
 * @method PR_CODIF_PRESUP     setRHNPCONNOM()       Sets the current record's "RH_NP_CON_NOM" collection
 * @method PR_CODIF_PRESUP     setPRAPROPIACION()    Sets the current record's "PR_APROPIACION" collection
 * @method PR_CODIF_PRESUP     setNOCONCEPNOMINA()   Sets the current record's "NO_CONCEP_NOMINA" 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_CODIF_PRESUP extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_CODIF_PRESUP');
        $this->hasColumn('id_rubro', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_clase_presup', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cod_rub1', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cod_rub2', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cod_rub3', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cod_rub4', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cod_rub5', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('vigencia', 'string', 4, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $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('PR_CLASES_PRESUP', array(
             'local' => 'id_clase_presup',
             'foreign' => 'id'));

        $this->hasOne('PR_PROG_GEN', array(
             'local' => 'cod_rub1',
             'foreign' => 'id'));

        $this->hasMany('RH_NP_CON_NOM', array(
             'local' => 'id_rubro',
             'foreign' => 'id_rubro'));

        $this->hasMany('PR_APROPIACION', array(
             'local' => 'id_rubro',
             'foreign' => 'id_rubro'));

        $this->hasMany('NO_CONCEP_NOMINA', array(
             'local' => 'id_rubro',
             'foreign' => 'id_rubro'));
    }
}