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

/**
 * BaseRH_SA_NIV2
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_sa_niv2
 * @property string $nombre
 * @property string $descripcion
 * @property integer $id_sa_niv1
 * @property integer $tipo_periodo
 * @property integer $tiempo
 * @property integer $prorroga
 * @property integer $tiempo_pro
 * @property integer $id_nat_emp
 * @property integer $nombramiento
 * @property integer $titular
 * @property RH_SA_NIV1 $RH_SA_NIV1
 * @property RH_AP_NATURALEZA_EM $RH_AP_NATURALEZA_EM
 * @property Doctrine_Collection $RH_SA_NOMBRAMIENTO
 * @property Doctrine_Collection $RH_SA_HIS
 * @property Doctrine_Collection $NO_NOMBRAMIENTO
 * 
 * @method integer             getIdSaNiv2()            Returns the current record's "id_sa_niv2" value
 * @method string              getNombre()              Returns the current record's "nombre" value
 * @method string              getDescripcion()         Returns the current record's "descripcion" value
 * @method integer             getIdSaNiv1()            Returns the current record's "id_sa_niv1" value
 * @method integer             getTipoPeriodo()         Returns the current record's "tipo_periodo" value
 * @method integer             getTiempo()              Returns the current record's "tiempo" value
 * @method integer             getProrroga()            Returns the current record's "prorroga" value
 * @method integer             getTiempoPro()           Returns the current record's "tiempo_pro" value
 * @method integer             getIdNatEmp()            Returns the current record's "id_nat_emp" value
 * @method integer             getNombramiento()        Returns the current record's "nombramiento" value
 * @method integer             getTitular()             Returns the current record's "titular" value
 * @method RH_SA_NIV1          getRHSANIV1()            Returns the current record's "RH_SA_NIV1" value
 * @method RH_AP_NATURALEZA_EM getRHAPNATURALEZAEM()    Returns the current record's "RH_AP_NATURALEZA_EM" value
 * @method Doctrine_Collection getRHSANOMBRAMIENTO()    Returns the current record's "RH_SA_NOMBRAMIENTO" collection
 * @method Doctrine_Collection getRHSAHIS()             Returns the current record's "RH_SA_HIS" collection
 * @method Doctrine_Collection getNONOMBRAMIENTO()      Returns the current record's "NO_NOMBRAMIENTO" collection
 * @method RH_SA_NIV2          setIdSaNiv2()            Sets the current record's "id_sa_niv2" value
 * @method RH_SA_NIV2          setNombre()              Sets the current record's "nombre" value
 * @method RH_SA_NIV2          setDescripcion()         Sets the current record's "descripcion" value
 * @method RH_SA_NIV2          setIdSaNiv1()            Sets the current record's "id_sa_niv1" value
 * @method RH_SA_NIV2          setTipoPeriodo()         Sets the current record's "tipo_periodo" value
 * @method RH_SA_NIV2          setTiempo()              Sets the current record's "tiempo" value
 * @method RH_SA_NIV2          setProrroga()            Sets the current record's "prorroga" value
 * @method RH_SA_NIV2          setTiempoPro()           Sets the current record's "tiempo_pro" value
 * @method RH_SA_NIV2          setIdNatEmp()            Sets the current record's "id_nat_emp" value
 * @method RH_SA_NIV2          setNombramiento()        Sets the current record's "nombramiento" value
 * @method RH_SA_NIV2          setTitular()             Sets the current record's "titular" value
 * @method RH_SA_NIV2          setRHSANIV1()            Sets the current record's "RH_SA_NIV1" value
 * @method RH_SA_NIV2          setRHAPNATURALEZAEM()    Sets the current record's "RH_AP_NATURALEZA_EM" value
 * @method RH_SA_NIV2          setRHSANOMBRAMIENTO()    Sets the current record's "RH_SA_NOMBRAMIENTO" collection
 * @method RH_SA_NIV2          setRHSAHIS()             Sets the current record's "RH_SA_HIS" collection
 * @method RH_SA_NIV2          setNONOMBRAMIENTO()      Sets the current record's "NO_NOMBRAMIENTO" 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_SA_NIV2 extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RH_SA_NIV2');
        $this->hasColumn('id_sa_niv2', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('nombre', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('descripcion', 'string', 600, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 600,
             ));
        $this->hasColumn('id_sa_niv1', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('tipo_periodo', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('tiempo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('prorroga', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('tiempo_pro', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_nat_emp', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('nombramiento', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('titular', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('encargado', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('cambia_tit_eng', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('texto_certificado', 'string', 250, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 250,
             ));
        
    }

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

        $this->hasOne('RH_AP_NATURALEZA_EM', array(
             'local' => 'id_nat_emp',
             'foreign' => 'id_nat_emp'));

        $this->hasMany('RH_SA_NOMBRAMIENTO', array(
             'local' => 'id_sa_niv2',
             'foreign' => 'id_sa_niv2'));

        $this->hasMany('RH_SA_HIS', array(
             'local' => 'id_sa_niv2',
             'foreign' => 'id_sa_niv2'));

        $this->hasMany('NO_NOMBRAMIENTO', array(
             'local' => 'id_sa_niv2',
             'foreign' => 'id_sa_niv2'));
    }
}