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

/**
 * BasePR_TIPO_REC
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $descripcion
 * @property integer $id_agrup
 * @property PR_AGRUP_REC $PR_AGRUP_REC
 * @property Doctrine_Collection $PR_APROPIACION
 * @property Doctrine_Collection $TS_EMISION_PAGO
 * 
 * @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 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 Doctrine_Collection getPRAPROPIACION()   Returns the current record's "PR_APROPIACION" collection
 * @method Doctrine_Collection getTSEMISIONPAGO()   Returns the current record's "TS_EMISION_PAGO" collection
 * @method PR_TIPO_REC         setId()              Sets the current record's "id" value
 * @method PR_TIPO_REC         setCodigo()          Sets the current record's "codigo" value
 * @method PR_TIPO_REC         setDescripcion()     Sets the current record's "descripcion" value
 * @method PR_TIPO_REC         setIdAgrup()         Sets the current record's "id_agrup" value
 * @method PR_TIPO_REC         setPRAGRUPREC()      Sets the current record's "PR_AGRUP_REC" value
 * @method PR_TIPO_REC         setPRAPROPIACION()   Sets the current record's "PR_APROPIACION" collection
 * @method PR_TIPO_REC         setTSEMISIONPAGO()   Sets the current record's "TS_EMISION_PAGO" 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_TIPO_REC extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_TIPO_REC');
        $this->hasColumn('id', 'integer', 20, array(
             '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('id_agrup', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

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

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