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

/**
 * BaseCOM_DESTINO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_destino
 * @property integer $id_comision
 * @property integer $nitocc
 * @property integer $destino_ini
 * @property integer $destino_fin
 * @property integer $id_tipo_transporte
 * @property COM_COMISION $COM_COMISION
 * @property MUNICIPIOS $MUNICIPIOS
 * @property MUNICIPIOS $MUNICIPIOS_3
 * @property TERCEROS $TERCEROS
 * @property TRANSPORTES $TRANSPORTES
 * 
 * @method integer      getIdDestino()          Returns the current record's "id_destino" value
 * @method integer      getIdComision()         Returns the current record's "id_comision" value
 * @method integer      getNitocc()             Returns the current record's "nitocc" value
 * @method integer      getDestinoIni()         Returns the current record's "destino_ini" value
 * @method integer      getDestinoFin()         Returns the current record's "destino_fin" value
 * @method integer      getIdTipoTransporte()   Returns the current record's "id_tipo_transporte" value
 * @method COM_COMISION getCOMCOMISION()        Returns the current record's "COM_COMISION" value
 * @method MUNICIPIOS   getMUNICIPIOS()         Returns the current record's "MUNICIPIOS" value
 * @method MUNICIPIOS   getMUNICIPIOS3()        Returns the current record's "MUNICIPIOS_3" value
 * @method TERCEROS     getTERCEROS()           Returns the current record's "TERCEROS" value
 * @method TRANSPORTES  getTRANSPORTES()        Returns the current record's "TRANSPORTES" value
 * @method COM_DESTINO  setIdDestino()          Sets the current record's "id_destino" value
 * @method COM_DESTINO  setIdComision()         Sets the current record's "id_comision" value
 * @method COM_DESTINO  setNitocc()             Sets the current record's "nitocc" value
 * @method COM_DESTINO  setDestinoIni()         Sets the current record's "destino_ini" value
 * @method COM_DESTINO  setDestinoFin()         Sets the current record's "destino_fin" value
 * @method COM_DESTINO  setIdTipoTransporte()   Sets the current record's "id_tipo_transporte" value
 * @method COM_DESTINO  setCOMCOMISION()        Sets the current record's "COM_COMISION" value
 * @method COM_DESTINO  setMUNICIPIOS()         Sets the current record's "MUNICIPIOS" value
 * @method COM_DESTINO  setMUNICIPIOS3()        Sets the current record's "MUNICIPIOS_3" value
 * @method COM_DESTINO  setTERCEROS()           Sets the current record's "TERCEROS" value
 * @method COM_DESTINO  setTRANSPORTES()        Sets the current record's "TRANSPORTES" 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_DESTINO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('COM_DESTINO');
        $this->hasColumn('id_destino', '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('destino_ini', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('destino_fin', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tipo_transporte', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('observaciones', 'string', 500, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        
    }

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

        $this->hasOne('MUNICIPIOS', array(
             'local' => 'destino_ini',
             'foreign' => 'codmun'));

        $this->hasOne('MUNICIPIOS as MUNICIPIOS_3', array(
             'local' => 'destino_fin',
             'foreign' => 'codmun'));

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

        $this->hasOne('TRANSPORTES', array(
             'local' => 'id_tipo_transporte',
             'foreign' => 'id'));
    }
}