<?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 decimal $asignacion_basica
 * @property timestamp $fecha_act
 * @property RH_PN_ESCALA $RH_PN_ESCALA
 * @property Doctrine_Collection $RH_PN_AS
 * @property Doctrine_Collection $RH_AP_DEN_EMP
 * 
 * @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 decimal                 getAsignacionBasica()    Returns the current record's "asignacion_basica" value
 * @method timestamp               getFechaAct()            Returns the current record's "fecha_act" value
 * @method RH_PN_ESCALA            getRHPNESCALA()          Returns the current record's "RH_PN_ESCALA" value
 * @method Doctrine_Collection     getRHPNAS()              Returns the current record's "RH_PN_AS" collection
 * @method Doctrine_Collection     getRHAPDENEMP()          Returns the current record's "RH_AP_DEN_EMP" 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 setFechaAct()            Sets the current record's "fecha_act" value
 * @method RH_PN_COMPONENTE_ESCALA setRHPNESCALA()          Sets the current record's "RH_PN_ESCALA" value
 * @method RH_PN_COMPONENTE_ESCALA setRHPNAS()              Sets the current record's "RH_PN_AS" collection
 * @method RH_PN_COMPONENTE_ESCALA setRHAPDENEMP()          Sets the current record's "RH_AP_DEN_EMP" collection
 * 
 * @package    controlComisiones
 * @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(
             'notnull' => false,
             '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' => false,
             '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', 'decimal', 20, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_act', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('RH_PN_ESCALA', array(
             'local' => 'id_escala',
             'foreign' => 'id_esc_sal'));

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

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