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

/**
 * BasePR_NIVEL_AGRUP
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $codigo
 * @property string $descripcion
 * @property string $abreviatura
 * @property integer $id_clase_presup
 * @property PR_CLASES_PRESUP $PR_CLASES_PRESUP
 * @property Doctrine_Collection $PR_CLASIF_PAC
 * @property Doctrine_Collection $PR_AGRUP_SF
 * 
 * @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 string              getAbreviatura()      Returns the current record's "abreviatura" value
 * @method integer             getIdClasePresup()    Returns the current record's "id_clase_presup" value
 * @method PR_CLASES_PRESUP    getPRCLASESPRESUP()   Returns the current record's "PR_CLASES_PRESUP" value
 * @method Doctrine_Collection getPRCLASIFPAC()      Returns the current record's "PR_CLASIF_PAC" collection
 * @method Doctrine_Collection getPRAGRUPSF()        Returns the current record's "PR_AGRUP_SF" collection
 * @method PR_NIVEL_AGRUP      setId()               Sets the current record's "id" value
 * @method PR_NIVEL_AGRUP      setCodigo()           Sets the current record's "codigo" value
 * @method PR_NIVEL_AGRUP      setDescripcion()      Sets the current record's "descripcion" value
 * @method PR_NIVEL_AGRUP      setAbreviatura()      Sets the current record's "abreviatura" value
 * @method PR_NIVEL_AGRUP      setIdClasePresup()    Sets the current record's "id_clase_presup" value
 * @method PR_NIVEL_AGRUP      setPRCLASESPRESUP()   Sets the current record's "PR_CLASES_PRESUP" value
 * @method PR_NIVEL_AGRUP      setPRCLASIFPAC()      Sets the current record's "PR_CLASIF_PAC" collection
 * @method PR_NIVEL_AGRUP      setPRAGRUPSF()        Sets the current record's "PR_AGRUP_SF" 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_NIVEL_AGRUP extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_NIVEL_AGRUP');
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('abreviatura', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_clase_presup', '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_CLASIF_PAC', array(
             'local' => 'id',
             'foreign' => 'id_nivel_agrup'));

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