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

/**
 * BasePR_AGRUP_SF
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $id_nivel_agrup
 * @property integer $id_situac_rec
 * @property integer $id_fuente_finan
 * @property PR_AGRUP_REC $PR_AGRUP_REC
 * @property PR_NIVEL_AGRUP $PR_NIVEL_AGRUP
 * @property PR_SITUA_REC $PR_SITUA_REC
 * @property Doctrine_Collection $PR_PAGOS_DISTRI
 * @property Doctrine_Collection $PR_NOV_PLAN_PAGOS_DISTRI
 * 
 * @method integer             getId()                       Returns the current record's "id" value
 * @method integer             getIdNivelAgrup()             Returns the current record's "id_nivel_agrup" value
 * @method integer             getIdSituacRec()              Returns the current record's "id_situac_rec" value
 * @method integer             getIdFuenteFinan()            Returns the current record's "id_fuente_finan" value
 * @method PR_AGRUP_REC        getPRAGRUPREC()               Returns the current record's "PR_AGRUP_REC" value
 * @method PR_NIVEL_AGRUP      getPRNIVELAGRUP()             Returns the current record's "PR_NIVEL_AGRUP" value
 * @method PR_SITUA_REC        getPRSITUAREC()               Returns the current record's "PR_SITUA_REC" value
 * @method Doctrine_Collection getPRPAGOSDISTRI()            Returns the current record's "PR_PAGOS_DISTRI" collection
 * @method Doctrine_Collection getPRNOVPLANPAGOSDISTRI()     Returns the current record's "PR_NOV_PLAN_PAGOS_DISTRI" collection
 * @method PR_AGRUP_SF         setId()                       Sets the current record's "id" value
 * @method PR_AGRUP_SF         setIdNivelAgrup()             Sets the current record's "id_nivel_agrup" value
 * @method PR_AGRUP_SF         setIdSituacRec()              Sets the current record's "id_situac_rec" value
 * @method PR_AGRUP_SF         setIdFuenteFinan()            Sets the current record's "id_fuente_finan" value
 * @method PR_AGRUP_SF         setPRAGRUPREC()               Sets the current record's "PR_AGRUP_REC" value
 * @method PR_AGRUP_SF         setPRNIVELAGRUP()             Sets the current record's "PR_NIVEL_AGRUP" value
 * @method PR_AGRUP_SF         setPRSITUAREC()               Sets the current record's "PR_SITUA_REC" value
 * @method PR_AGRUP_SF         setPRPAGOSDISTRI()            Sets the current record's "PR_PAGOS_DISTRI" collection
 * @method PR_AGRUP_SF         setPRNOVPLANPAGOSDISTRI()     Sets the current record's "PR_NOV_PLAN_PAGOS_DISTRI" 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_AGRUP_SF extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_AGRUP_SF');
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_nivel_agrup', '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('id_fuente_finan', '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_fuente_finan',
             'foreign' => 'id'));

        $this->hasOne('PR_NIVEL_AGRUP', array(
             'local' => 'id_nivel_agrup',
             'foreign' => 'id'));

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

        $this->hasMany('PR_PAGOS_DISTRI', array(
             'local' => 'id',
             'foreign' => 'id_nivel_agrup'));

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