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

/**
 * BasePR_PROG_GEN
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $codigo
 * @property string $descripcion
 * @property integer $id_clase_presup
 * @property string $vigencia
 * @property integer $id_nivel_agrup
 * @property PR_CLASES_PRESUP $PR_CLASES_PRESUP
 * @property Doctrine_Collection $PR_CODIF_PRESUP
 * 
 * @method integer             getId()               Returns the current record's "id" value
 * @method integer             getCodigo()           Returns the current record's "codigo" value
 * @method string              getDescripcion()      Returns the current record's "descripcion" value
 * @method integer             getIdClasePresup()    Returns the current record's "id_clase_presup" value
 * @method string              getVigencia()         Returns the current record's "vigencia" value
 * @method integer             getIdNivelAgrup()     Returns the current record's "id_nivel_agrup" value
 * @method PR_CLASES_PRESUP    getPRCLASESPRESUP()   Returns the current record's "PR_CLASES_PRESUP" value
 * @method Doctrine_Collection getPRCODIFPRESUP()    Returns the current record's "PR_CODIF_PRESUP" collection
 * @method PR_PROG_GEN         setId()               Sets the current record's "id" value
 * @method PR_PROG_GEN         setCodigo()           Sets the current record's "codigo" value
 * @method PR_PROG_GEN         setDescripcion()      Sets the current record's "descripcion" value
 * @method PR_PROG_GEN         setIdClasePresup()    Sets the current record's "id_clase_presup" value
 * @method PR_PROG_GEN         setVigencia()         Sets the current record's "vigencia" value
 * @method PR_PROG_GEN         setIdNivelAgrup()     Sets the current record's "id_nivel_agrup" value
 * @method PR_PROG_GEN         setPRCLASESPRESUP()   Sets the current record's "PR_CLASES_PRESUP" value
 * @method PR_PROG_GEN         setPRCODIFPRESUP()    Sets the current record's "PR_CODIF_PRESUP" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_PROG_GEN extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_PROG_GEN');
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('id_clase_presup', 'integer', 20, array(
             'notnull' => false,
             '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('id_nivel_agrup', '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->hasMany('PR_CODIF_PRESUP', array(
             'local' => 'id',
             'foreign' => 'cod_rub1'));
    }
}