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

/**
 * BaseNO_CERTI_RETEFUENTE
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_certi_retefuente
 * @property integer $id_concep_nomina
 * @property integer $id_periodo
 * @property integer $id_tipo_doc
 * @property string $num_doc
 * @property integer $meses
 * @property decimal $valor_descuento
 * @property string $observaciones
 * @property decimal $porcentaje
 * @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_CONCEP_NOMINA $NO_CONCEP_NOMINA
 * 
 * @method integer             getIdCertiRetefuente()   Returns the current record's "id_certi_retefuente" value
 * @method integer             getIdConcepNomina()      Returns the current record's "id_concep_nomina" value
 * @method integer             getIdPeriodo()           Returns the current record's "id_periodo" 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             getMeses()               Returns the current record's "meses" value
 * @method decimal             getValorDescuento()      Returns the current record's "valor_descuento" value
 * @method string              getObservaciones()       Returns the current record's "observaciones" value
 * @method decimal             getPorcentaje()          Returns the current record's "porcentaje" 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_CONCEP_NOMINA    getNOCONCEPNOMINA()      Returns the current record's "NO_CONCEP_NOMINA" value
 * @method NO_CERTI_RETEFUENTE setIdCertiRetefuente()   Sets the current record's "id_certi_retefuente" value
 * @method NO_CERTI_RETEFUENTE setIdConcepNomina()      Sets the current record's "id_concep_nomina" value
 * @method NO_CERTI_RETEFUENTE setIdPeriodo()           Sets the current record's "id_periodo" value
 * @method NO_CERTI_RETEFUENTE setIdTipoDoc()           Sets the current record's "id_tipo_doc" value
 * @method NO_CERTI_RETEFUENTE setNumDoc()              Sets the current record's "num_doc" value
 * @method NO_CERTI_RETEFUENTE setMeses()               Sets the current record's "meses" value
 * @method NO_CERTI_RETEFUENTE setValorDescuento()      Sets the current record's "valor_descuento" value
 * @method NO_CERTI_RETEFUENTE setObservaciones()       Sets the current record's "observaciones" value
 * @method NO_CERTI_RETEFUENTE setPorcentaje()          Sets the current record's "porcentaje" value
 * @method NO_CERTI_RETEFUENTE setDATOSFUNCIONARIO()    Sets the current record's "DATOS_FUNCIONARIO" value
 * @method NO_CERTI_RETEFUENTE setDATOSFUNCIONARIO2()   Sets the current record's "DATOS_FUNCIONARIO_2" value
 * @method NO_CERTI_RETEFUENTE setDATOSFUNCIONARIO3()   Sets the current record's "DATOS_FUNCIONARIO_3" value
 * @method NO_CERTI_RETEFUENTE setDATOSFUNCIONARIO4()   Sets the current record's "DATOS_FUNCIONARIO_4" value
 * @method NO_CERTI_RETEFUENTE setNOCONCEPNOMINA()      Sets the current record's "NO_CONCEP_NOMINA" value
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseNO_CERTI_RETEFUENTE extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('NO_CERTI_RETEFUENTE');
        $this->hasColumn('id_certi_retefuente', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_concep_nomina', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_periodo', 'integer', 20, array(
             'notnull' => true,
             '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('meses', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_descuento', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('observaciones', 'string', 2000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2000,
             ));
        $this->hasColumn('porcentaje', 'decimal', 20, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 20,
             ));
    }

    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' => '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'));

        $this->hasOne('NO_CONCEP_NOMINA', array(
             'local' => 'id_concep_nomina',
             'foreign' => 'id_concep_nomina'));
    }
}