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

/**
 * BaseNO_CAL_RETEFUENTE_HIST
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_cal_retefuente_hist
 * @property integer $id_tipo_doc
 * @property string $num_doc
 * @property integer $diastot
 * @property decimal $totdev
 * @property decimal $apopen
 * @property decimal $apofsp
 * @property decimal $apovol
 * @property decimal $aposal_obl
 * @property integer $diasal_obl
 * @property integer $id_periodo
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_2
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_3
 * @property DATOS_FUNCIONARIO $DATOS_FUNCIONARIO_4
 * @property NO_PERIODO $NO_PERIODO
 * 
 * @method integer                getIdCalRetefuenteHist()    Returns the current record's "id_cal_retefuente_hist" 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                getDiastot()                Returns the current record's "diastot" value
 * @method decimal                getTotdev()                 Returns the current record's "totdev" value
 * @method decimal                getApopen()                 Returns the current record's "apopen" value
 * @method decimal                getApofsp()                 Returns the current record's "apofsp" value
 * @method decimal                getApovol()                 Returns the current record's "apovol" value
 * @method decimal                getAposalObl()              Returns the current record's "aposal_obl" value
 * @method integer                getDiasalObl()              Returns the current record's "diasal_obl" value
 * @method integer                getIdPeriodo()              Returns the current record's "id_periodo" 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 NO_PERIODO             getNOPERIODO()              Returns the current record's "NO_PERIODO" value
 * @method NO_CAL_RETEFUENTE_HIST setIdCalRetefuenteHist()    Sets the current record's "id_cal_retefuente_hist" value
 * @method NO_CAL_RETEFUENTE_HIST setIdTipoDoc()              Sets the current record's "id_tipo_doc" value
 * @method NO_CAL_RETEFUENTE_HIST setNumDoc()                 Sets the current record's "num_doc" value
 * @method NO_CAL_RETEFUENTE_HIST setDiastot()                Sets the current record's "diastot" value
 * @method NO_CAL_RETEFUENTE_HIST setTotdev()                 Sets the current record's "totdev" value
 * @method NO_CAL_RETEFUENTE_HIST setApopen()                 Sets the current record's "apopen" value
 * @method NO_CAL_RETEFUENTE_HIST setApofsp()                 Sets the current record's "apofsp" value
 * @method NO_CAL_RETEFUENTE_HIST setApovol()                 Sets the current record's "apovol" value
 * @method NO_CAL_RETEFUENTE_HIST setAposalObl()              Sets the current record's "aposal_obl" value
 * @method NO_CAL_RETEFUENTE_HIST setDiasalObl()              Sets the current record's "diasal_obl" value
 * @method NO_CAL_RETEFUENTE_HIST setIdPeriodo()              Sets the current record's "id_periodo" value
 * @method NO_CAL_RETEFUENTE_HIST setDATOSFUNCIONARIO()       Sets the current record's "DATOS_FUNCIONARIO" value
 * @method NO_CAL_RETEFUENTE_HIST setDATOSFUNCIONARIO2()      Sets the current record's "DATOS_FUNCIONARIO_2" value
 * @method NO_CAL_RETEFUENTE_HIST setDATOSFUNCIONARIO3()      Sets the current record's "DATOS_FUNCIONARIO_3" value
 * @method NO_CAL_RETEFUENTE_HIST setDATOSFUNCIONARIO4()      Sets the current record's "DATOS_FUNCIONARIO_4" value
 * @method NO_CAL_RETEFUENTE_HIST setNOPERIODO()              Sets the current record's "NO_PERIODO" value
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseNO_CAL_RETEFUENTE_HIST extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('NO_CAL_RETEFUENTE_HIST');
        $this->hasColumn('id_cal_retefuente_hist', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_tipo_doc', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('num_doc', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('diastot', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('totdev', 'decimal', 18, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('apopen', 'decimal', 18, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('apofsp', 'decimal', 18, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('apovol', 'decimal', 18, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('aposal_obl', 'decimal', 18, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('diasal_obl', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_periodo', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasOne('DATOS_FUNCIONARIO as DATOS_FUNCIONARIO_2', array(
             'local' => 'id_tipo_doc',
             'foreign' => 'num_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' => 'num_doc',
             'foreign' => 'num_doc'));

        $this->hasOne('NO_PERIODO', array(
             'local' => 'id_periodo',
             'foreign' => 'id_periodo'));
    }
}