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

/**
 * BaseCOM_COMISIONADO_OBJ
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_comisionado_obj
 * @property integer $id_comision
 * @property integer $nitocc
 * @property integer $id_obj_gasto
 * @property decimal $valor
 * @property COM_COMISION $COM_COMISION
 * @property OBJETOS_GASTO $OBJETOS_GASTO
 * @property TERCEROS $TERCEROS
 * 
 * @method integer             getIdComisionadoObj()   Returns the current record's "id_comisionado_obj" value
 * @method integer             getIdComision()         Returns the current record's "id_comision" value
 * @method integer             getNitocc()             Returns the current record's "nitocc" value
 * @method integer             getIdObjGasto()         Returns the current record's "id_obj_gasto" value
 * @method decimal             getValor()              Returns the current record's "valor" value
 * @method COM_COMISION        getCOMCOMISION()        Returns the current record's "COM_COMISION" value
 * @method OBJETOS_GASTO       getOBJETOSGASTO()       Returns the current record's "OBJETOS_GASTO" value
 * @method TERCEROS            getTERCEROS()           Returns the current record's "TERCEROS" value
 * @method COM_COMISIONADO_OBJ setIdComisionadoObj()   Sets the current record's "id_comisionado_obj" value
 * @method COM_COMISIONADO_OBJ setIdComision()         Sets the current record's "id_comision" value
 * @method COM_COMISIONADO_OBJ setNitocc()             Sets the current record's "nitocc" value
 * @method COM_COMISIONADO_OBJ setIdObjGasto()         Sets the current record's "id_obj_gasto" value
 * @method COM_COMISIONADO_OBJ setValor()              Sets the current record's "valor" value
 * @method COM_COMISIONADO_OBJ setCOMCOMISION()        Sets the current record's "COM_COMISION" value
 * @method COM_COMISIONADO_OBJ setOBJETOSGASTO()       Sets the current record's "OBJETOS_GASTO" value
 * @method COM_COMISIONADO_OBJ setTERCEROS()           Sets the current record's "TERCEROS" value
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCOM_COMISIONADO_OBJ extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('COM_COMISIONADO_OBJ');
        $this->hasColumn('id_comisionado_obj', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_comision', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tercero', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_obj_gasto', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('observaciones', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('porc_iva', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_iva', 'decimal', 20, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        
    }

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

        $this->hasOne('OBJETOS_GASTO', array(
             'local' => 'id_obj_gasto',
             'foreign' => 'id'));

        $this->hasOne('COM_TERCERO', array(
             'local' => 'id_tercero',
             'foreign' => 'id_tercero'));
    }
}