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

/**
 * BaseMATERIAL_REPLICA_FUNCIONARIO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_mat_rep_fun
 * @property integer $id_material_replica
 * @property integer $id_tipo_doc
 * @property string $num_doc
 * @property MATERIAL_REPLICA $MATERIAL_REPLICA
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_2
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_3
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_4
 * 
 * @method integer                      getIdMatRepFun()         Returns the current record's "id_mat_rep_fun" value
 * @method integer                      getIdMaterialReplica()   Returns the current record's "id_material_replica" 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 MATERIAL_REPLICA             getMATERIALREPLICA()     Returns the current record's "MATERIAL_REPLICA" value
 * @method DATOS_FUNCIONARIO            getDATOSFUNCIONARIO()    Returns the current record's "DATOS_FUNCIONARIO" value
 * @method DATOS_FUNCIONARIO            getDATOSFUNCIONARIO2()   Returns the current record's "DATOS_FUNCIONARIO_2" 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 MATERIAL_REPLICA_FUNCIONARIO setIdMatRepFun()         Sets the current record's "id_mat_rep_fun" value
 * @method MATERIAL_REPLICA_FUNCIONARIO setIdMaterialReplica()   Sets the current record's "id_material_replica" value
 * @method MATERIAL_REPLICA_FUNCIONARIO setIdTipoDoc()           Sets the current record's "id_tipo_doc" value
 * @method MATERIAL_REPLICA_FUNCIONARIO setNumDoc()              Sets the current record's "num_doc" value
 * @method MATERIAL_REPLICA_FUNCIONARIO setMATERIALREPLICA()     Sets the current record's "MATERIAL_REPLICA" value
 * @method MATERIAL_REPLICA_FUNCIONARIO setDATOSFUNCIONARIO()    Sets the current record's "DATOS_FUNCIONARIO" value
 * @method MATERIAL_REPLICA_FUNCIONARIO setDATOSFUNCIONARIO2()   Sets the current record's "DATOS_FUNCIONARIO_2" value
 * @method MATERIAL_REPLICA_FUNCIONARIO setDATOSFUNCIONARIO3()   Sets the current record's "DATOS_FUNCIONARIO_3" value
 * @method MATERIAL_REPLICA_FUNCIONARIO setDATOSFUNCIONARIO4()   Sets the current record's "DATOS_FUNCIONARIO_4" value
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseMATERIAL_REPLICA_FUNCIONARIO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('MATERIAL_REPLICA_FUNCIONARIO');
        $this->hasColumn('id_mat_rep_fun', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_material_replica', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tipo_doc', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('num_doc', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

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

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

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

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