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

/**
 * BaseRH_PN_JERARQUIA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $nivel
 * @property string $descripcion
 * @property integer $id
 * @property Doctrine_Collection $RH_CL
 * @property Doctrine_Collection $RH_PN_COMPONENTE_ESCALA
 * 
 * @method integer             getNivel()                   Returns the current record's "nivel" value
 * @method string              getDescripcion()             Returns the current record's "descripcion" value
 * @method integer             getId()                      Returns the current record's "id" value
 * @method Doctrine_Collection getRHCL()                    Returns the current record's "RH_CL" collection
 * @method Doctrine_Collection getRHPNCOMPONENTEESCALA()    Returns the current record's "RH_PN_COMPONENTE_ESCALA" collection
 * @method RH_PN_JERARQUIA     setNivel()                   Sets the current record's "nivel" value
 * @method RH_PN_JERARQUIA     setDescripcion()             Sets the current record's "descripcion" value
 * @method RH_PN_JERARQUIA     setId()                      Sets the current record's "id" value
 * @method RH_PN_JERARQUIA     setRHCL()                    Sets the current record's "RH_CL" collection
 * @method RH_PN_JERARQUIA     setRHPNCOMPONENTEESCALA()    Sets the current record's "RH_PN_COMPONENTE_ESCALA" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRH_PN_JERARQUIA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RH_PN_JERARQUIA');
        $this->hasColumn('nivel', 'integer', 2, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 2,
             ));
        $this->hasColumn('descripcion', 'string', 50, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 50,
             ));
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('RH_CL', array(
             'local' => 'nivel',
             'foreign' => 'id_nivel_jerarquico'));

        $this->hasMany('RH_PN_COMPONENTE_ESCALA', array(
             'local' => 'nivel',
             'foreign' => 'id_nivel_jerarquico'));
    }
}