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

/**
 * BasePR_AGRUP_REC
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $descripcion
 * @property string $abreviatura
 * @property Doctrine_Collection $PR_TIPO_REC
 * @property Doctrine_Collection $PR_FUENTE_FINAN
 * @property Doctrine_Collection $PR_CATALOGO_PAC
 * @property Doctrine_Collection $PR_AGRUP_SF
 * 
 * @method integer             getId()              Returns the current record's "id" value
 * @method string              getCodigo()          Returns the current record's "codigo" value
 * @method string              getDescripcion()     Returns the current record's "descripcion" value
 * @method string              getAbreviatura()     Returns the current record's "abreviatura" value
 * @method Doctrine_Collection getPRTIPOREC()       Returns the current record's "PR_TIPO_REC" collection
 * @method Doctrine_Collection getPRFUENTEFINAN()   Returns the current record's "PR_FUENTE_FINAN" collection
 * @method Doctrine_Collection getPRCATALOGOPAC()   Returns the current record's "PR_CATALOGO_PAC" collection
 * @method Doctrine_Collection getPRAGRUPSF()       Returns the current record's "PR_AGRUP_SF" collection
 * @method PR_AGRUP_REC        setId()              Sets the current record's "id" value
 * @method PR_AGRUP_REC        setCodigo()          Sets the current record's "codigo" value
 * @method PR_AGRUP_REC        setDescripcion()     Sets the current record's "descripcion" value
 * @method PR_AGRUP_REC        setAbreviatura()     Sets the current record's "abreviatura" value
 * @method PR_AGRUP_REC        setPRTIPOREC()       Sets the current record's "PR_TIPO_REC" collection
 * @method PR_AGRUP_REC        setPRFUENTEFINAN()   Sets the current record's "PR_FUENTE_FINAN" collection
 * @method PR_AGRUP_REC        setPRCATALOGOPAC()   Sets the current record's "PR_CATALOGO_PAC" collection
 * @method PR_AGRUP_REC        setPRAGRUPSF()       Sets the current record's "PR_AGRUP_SF" collection
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_AGRUP_REC extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_AGRUP_REC');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 3, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 3,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('abreviatura', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('PR_TIPO_REC', array(
             'local' => 'id',
             'foreign' => 'id_agrup'));

        $this->hasMany('PR_FUENTE_FINAN', array(
             'local' => 'id',
             'foreign' => 'id_agrup_rec'));

        $this->hasMany('PR_CATALOGO_PAC', array(
             'local' => 'id',
             'foreign' => 'id_agrup'));

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