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

/**
 * BaseRH_SA_H
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_sa_h
 * @property integer $id_sa
 * @property integer $id_tipo_doc
 * @property string $num_doc
 * @property integer $id_dp
 * @property timestamp $fecha_i
 * @property timestamp $fecha_f
 * @property timestamp $fecha_i_labor
 * @property timestamp $fecha_f_labor
 * @property RH_SA $RH_SA
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_3
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_4
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_5
 * 
 * @method integer           getIdSaH()               Returns the current record's "id_sa_h" value
 * @method integer           getIdSa()                Returns the current record's "id_sa" value
 * @method integer           getIdTipoDoc()           Returns the current record's "id_tipo_doc" value
 * @method string            getNumDoc()              Returns the current record's "num_doc" value
 * @method integer           getIdDp()                Returns the current record's "id_dp" value
 * @method timestamp         getFechaI()              Returns the current record's "fecha_i" value
 * @method timestamp         getFechaF()              Returns the current record's "fecha_f" value
 * @method timestamp         getFechaILabor()         Returns the current record's "fecha_i_labor" value
 * @method timestamp         getFechaFLabor()         Returns the current record's "fecha_f_labor" value
 * @method RH_SA             getRHSA()                Returns the current record's "RH_SA" value
 * @method DATOS_FUNCIONARIO getDATOSFUNCIONARIO()    Returns the current record's "DATOS_FUNCIONARIO" value
 * @method DATOS_FUNCIONARIO getDATOSFUNCIONARIO3()   Returns the current record's "DATOS_FUNCIONARIO_3" value
 * @method DATOS_FUNCIONARIO getDATOSFUNCIONARIO4()   Returns the current record's "DATOS_FUNCIONARIO_4" value
 * @method DATOS_FUNCIONARIO getDATOSFUNCIONARIO5()   Returns the current record's "DATOS_FUNCIONARIO_5" value
 * @method RH_SA_H           setIdSaH()               Sets the current record's "id_sa_h" value
 * @method RH_SA_H           setIdSa()                Sets the current record's "id_sa" value
 * @method RH_SA_H           setIdTipoDoc()           Sets the current record's "id_tipo_doc" value
 * @method RH_SA_H           setNumDoc()              Sets the current record's "num_doc" value
 * @method RH_SA_H           setIdDp()                Sets the current record's "id_dp" value
 * @method RH_SA_H           setFechaI()              Sets the current record's "fecha_i" value
 * @method RH_SA_H           setFechaF()              Sets the current record's "fecha_f" value
 * @method RH_SA_H           setFechaILabor()         Sets the current record's "fecha_i_labor" value
 * @method RH_SA_H           setFechaFLabor()         Sets the current record's "fecha_f_labor" value
 * @method RH_SA_H           setRHSA()                Sets the current record's "RH_SA" value
 * @method RH_SA_H           setDATOSFUNCIONARIO()    Sets the current record's "DATOS_FUNCIONARIO" value
 * @method RH_SA_H           setDATOSFUNCIONARIO3()   Sets the current record's "DATOS_FUNCIONARIO_3" value
 * @method RH_SA_H           setDATOSFUNCIONARIO4()   Sets the current record's "DATOS_FUNCIONARIO_4" value
 * @method RH_SA_H           setDATOSFUNCIONARIO5()   Sets the current record's "DATOS_FUNCIONARIO_5" value
 * 
 * @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_H extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RH_SA_H');
        $this->hasColumn('id_sa_h', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_sa', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tipo_doc', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('num_doc', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_dp', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_i', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_f', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_i_labor', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_f_labor', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
    }

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

        $this->hasOne('DATOS_FUNCIONARIO', array(
             'local' => 'id_tipo_doc',
             'foreign' => 'id_tipo_doc'));

        $this->hasOne('DATOS_FUNCIONARIO as DATOS_FUNCIONARIO_3', array(
             'local' => 'num_doc',
             'foreign' => 'id_tipo_doc'));

        $this->hasOne('DATOS_FUNCIONARIO as DATOS_FUNCIONARIO_4', array(
             'local' => 'id_tipo_doc',
             'foreign' => 'num_doc'));

        $this->hasOne('DATOS_FUNCIONARIO as DATOS_FUNCIONARIO_5', array(
             'local' => 'num_doc',
             'foreign' => 'num_doc'));
    }
}