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

/**
 * BasePR_CATALOGO_PAC
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $id_clase_presup
 * @property integer $id_situac_rec
 * @property string $vigencia
 * @property integer $id_agrup
 * @property PR_AGRUP_REC $PR_AGRUP_REC
 * @property PR_CLASES_PRESUP $PR_CLASES_PRESUP
 * @property PR_SITUA_REC $PR_SITUA_REC
 * @property Doctrine_Collection $TS_PAC
 * @property Doctrine_Collection $PR_PAC
 * 
 * @method integer             getId()               Returns the current record's "id" value
 * @method integer             getIdClasePresup()    Returns the current record's "id_clase_presup" value
 * @method integer             getIdSituacRec()      Returns the current record's "id_situac_rec" value
 * @method string              getVigencia()         Returns the current record's "vigencia" value
 * @method integer             getIdAgrup()          Returns the current record's "id_agrup" value
 * @method PR_AGRUP_REC        getPRAGRUPREC()       Returns the current record's "PR_AGRUP_REC" value
 * @method PR_CLASES_PRESUP    getPRCLASESPRESUP()   Returns the current record's "PR_CLASES_PRESUP" value
 * @method PR_SITUA_REC        getPRSITUAREC()       Returns the current record's "PR_SITUA_REC" value
 * @method Doctrine_Collection getTSPAC()            Returns the current record's "TS_PAC" collection
 * @method Doctrine_Collection getPRPAC()            Returns the current record's "PR_PAC" collection
 * @method PR_CATALOGO_PAC     setId()               Sets the current record's "id" value
 * @method PR_CATALOGO_PAC     setIdClasePresup()    Sets the current record's "id_clase_presup" value
 * @method PR_CATALOGO_PAC     setIdSituacRec()      Sets the current record's "id_situac_rec" value
 * @method PR_CATALOGO_PAC     setVigencia()         Sets the current record's "vigencia" value
 * @method PR_CATALOGO_PAC     setIdAgrup()          Sets the current record's "id_agrup" value
 * @method PR_CATALOGO_PAC     setPRAGRUPREC()       Sets the current record's "PR_AGRUP_REC" value
 * @method PR_CATALOGO_PAC     setPRCLASESPRESUP()   Sets the current record's "PR_CLASES_PRESUP" value
 * @method PR_CATALOGO_PAC     setPRSITUAREC()       Sets the current record's "PR_SITUA_REC" value
 * @method PR_CATALOGO_PAC     setTSPAC()            Sets the current record's "TS_PAC" collection
 * @method PR_CATALOGO_PAC     setPRPAC()            Sets the current record's "PR_PAC" collection
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_CATALOGO_PAC extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_CATALOGO_PAC');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             '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('id_situac_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('id_agrup', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasOne('PR_CLASES_PRESUP', array(
             'local' => 'id_clase_presup',
             'foreign' => 'id'));

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

        $this->hasMany('TS_PAC', array(
             'local' => 'id',
             'foreign' => 'id_pr_catalogo_pac'));

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