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

/**
 * BaseRH_PN_ESCALA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_esc_sal
 * @property string $codigo
 * @property string $nombre
 * @property integer $id_tipo_escala
 * @property integer $id_orden
 * @property string $comentario
 * @property RH_PN_TIPO_ESCALA $RH_PN_TIPO_ESCALA
 * @property Doctrine_Collection $RH_PN_COMPONENTE_ESCALA
 * 
 * @method integer             getIdEscSal()                Returns the current record's "id_esc_sal" value
 * @method string              getCodigo()                  Returns the current record's "codigo" value
 * @method string              getNombre()                  Returns the current record's "nombre" value
 * @method integer             getIdTipoEscala()            Returns the current record's "id_tipo_escala" value
 * @method integer             getIdOrden()                 Returns the current record's "id_orden" value
 * @method string              getComentario()              Returns the current record's "comentario" value
 * @method RH_PN_TIPO_ESCALA   getRHPNTIPOESCALA()          Returns the current record's "RH_PN_TIPO_ESCALA" value
 * @method Doctrine_Collection getRHPNCOMPONENTEESCALA()    Returns the current record's "RH_PN_COMPONENTE_ESCALA" collection
 * @method RH_PN_ESCALA        setIdEscSal()                Sets the current record's "id_esc_sal" value
 * @method RH_PN_ESCALA        setCodigo()                  Sets the current record's "codigo" value
 * @method RH_PN_ESCALA        setNombre()                  Sets the current record's "nombre" value
 * @method RH_PN_ESCALA        setIdTipoEscala()            Sets the current record's "id_tipo_escala" value
 * @method RH_PN_ESCALA        setIdOrden()                 Sets the current record's "id_orden" value
 * @method RH_PN_ESCALA        setComentario()              Sets the current record's "comentario" value
 * @method RH_PN_ESCALA        setRHPNTIPOESCALA()          Sets the current record's "RH_PN_TIPO_ESCALA" value
 * @method RH_PN_ESCALA        setRHPNCOMPONENTEESCALA()    Sets the current record's "RH_PN_COMPONENTE_ESCALA" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRH_PN_ESCALA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RH_PN_ESCALA');
        $this->hasColumn('id_esc_sal', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('nombre', 'string', 200, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('id_tipo_escala', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_orden', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('comentario', 'string', 300, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 300,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasOne('RH_PN_TIPO_ESCALA', array(
             'local' => 'id_tipo_escala',
             'foreign' => 'id_tip_esc'));

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