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

/**
 * BaseRH_PN_COMPONENTE_ESCALA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_com_esc
 * @property integer $id_escala
 * @property integer $id_nivel_jerarquico
 * @property string $codigo
 * @property string $grado
 * @property string $denominacion
 * @property string $asignacion_basica
 * @property RH_PN_JERARQUIA $RH_PN_JERARQUIA
 * @property RH_PN_ESCALA $RH_PN_ESCALA
 * @property Doctrine_Collection $RH_AP_DEN_EMP
 * @property Doctrine_Collection $RH_PN_AS
 * 
 * @method integer                 getIdComEsc()            Returns the current record's "id_com_esc" value
 * @method integer                 getIdEscala()            Returns the current record's "id_escala" value
 * @method integer                 getIdNivelJerarquico()   Returns the current record's "id_nivel_jerarquico" value
 * @method string                  getCodigo()              Returns the current record's "codigo" value
 * @method string                  getGrado()               Returns the current record's "grado" value
 * @method string                  getDenominacion()        Returns the current record's "denominacion" value
 * @method string                  getAsignacionBasica()    Returns the current record's "asignacion_basica" value
 * @method RH_PN_JERARQUIA         getRHPNJERARQUIA()       Returns the current record's "RH_PN_JERARQUIA" value
 * @method RH_PN_ESCALA            getRHPNESCALA()          Returns the current record's "RH_PN_ESCALA" value
 * @method Doctrine_Collection     getRHAPDENEMP()          Returns the current record's "RH_AP_DEN_EMP" collection
 * @method Doctrine_Collection     getRHPNAS()              Returns the current record's "RH_PN_AS" collection
 * @method RH_PN_COMPONENTE_ESCALA setIdComEsc()            Sets the current record's "id_com_esc" value
 * @method RH_PN_COMPONENTE_ESCALA setIdEscala()            Sets the current record's "id_escala" value
 * @method RH_PN_COMPONENTE_ESCALA setIdNivelJerarquico()   Sets the current record's "id_nivel_jerarquico" value
 * @method RH_PN_COMPONENTE_ESCALA setCodigo()              Sets the current record's "codigo" value
 * @method RH_PN_COMPONENTE_ESCALA setGrado()               Sets the current record's "grado" value
 * @method RH_PN_COMPONENTE_ESCALA setDenominacion()        Sets the current record's "denominacion" value
 * @method RH_PN_COMPONENTE_ESCALA setAsignacionBasica()    Sets the current record's "asignacion_basica" value
 * @method RH_PN_COMPONENTE_ESCALA setRHPNJERARQUIA()       Sets the current record's "RH_PN_JERARQUIA" value
 * @method RH_PN_COMPONENTE_ESCALA setRHPNESCALA()          Sets the current record's "RH_PN_ESCALA" value
 * @method RH_PN_COMPONENTE_ESCALA setRHAPDENEMP()          Sets the current record's "RH_AP_DEN_EMP" collection
 * @method RH_PN_COMPONENTE_ESCALA setRHPNAS()              Sets the current record's "RH_PN_AS" 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_COMPONENTE_ESCALA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RH_PN_COMPONENTE_ESCALA');
        $this->hasColumn('id_com_esc', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_escala', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_nivel_jerarquico', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 4, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $this->hasColumn('grado', 'string', 2, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2,
             ));
        $this->hasColumn('denominacion', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('asignacion_basica', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('RH_PN_ESCALA', array(
             'local' => 'id_escala',
             'foreign' => 'id_esc_sal'));

        $this->hasMany('RH_AP_DEN_EMP', array(
             'local' => 'id_com_esc',
             'foreign' => 'id_comp_es'));

        $this->hasMany('RH_PN_AS', array(
             'local' => 'id_com_esc',
             'foreign' => 'id_com_es'));
    }
}