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

/**
 * BaseRENTAS
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_renta
 * @property integer $id_tipo_doc
 * @property string $num_doc
 * @property integer $salarios
 * @property integer $cesantias
 * @property integer $gastos_representacion
 * @property integer $arriendos
 * @property integer $otros
 * @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           getIdRenta()               Returns the current record's "id_renta" 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           getSalarios()              Returns the current record's "salarios" value
 * @method integer           getCesantias()             Returns the current record's "cesantias" value
 * @method integer           getGastosRepresentacion()  Returns the current record's "gastos_representacion" value
 * @method integer           getArriendos()             Returns the current record's "arriendos" value
 * @method integer           getOtros()                 Returns the current record's "otros" 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 RENTAS            setIdRenta()               Sets the current record's "id_renta" value
 * @method RENTAS            setIdTipoDoc()             Sets the current record's "id_tipo_doc" value
 * @method RENTAS            setNumDoc()                Sets the current record's "num_doc" value
 * @method RENTAS            setSalarios()              Sets the current record's "salarios" value
 * @method RENTAS            setCesantias()             Sets the current record's "cesantias" value
 * @method RENTAS            setGastosRepresentacion()  Sets the current record's "gastos_representacion" value
 * @method RENTAS            setArriendos()             Sets the current record's "arriendos" value
 * @method RENTAS            setOtros()                 Sets the current record's "otros" value
 * @method RENTAS            setDATOSFUNCIONARIO()      Sets the current record's "DATOS_FUNCIONARIO" value
 * @method RENTAS            setDATOSFUNCIONARIO2()     Sets the current record's "DATOS_FUNCIONARIO_2" value
 * @method RENTAS            setDATOSFUNCIONARIO3()     Sets the current record's "DATOS_FUNCIONARIO_3" value
 * @method RENTAS            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 BaseRENTAS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RENTAS');
        $this->hasColumn('id_renta', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             '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' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('salarios', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cesantias', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('gastos_representacion', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('arriendos', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('otros', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             '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'));
    }
}