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

/**
 * BaseTRANSPORTES
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $descripcion
 * @property Doctrine_Collection $DESTINOS_COMISIONADOS
 * @property Doctrine_Collection $COM_DESTINO
 * @property Doctrine_Collection $COMISIONADOS_PLANTA
 * @property Doctrine_Collection $COMISIONADOS_CONTRATO
 * 
 * @method integer             getId()                    Returns the current record's "id" value
 * @method string              getDescripcion()           Returns the current record's "descripcion" value
 * @method Doctrine_Collection getDESTINOSCOMISIONADOS()  Returns the current record's "DESTINOS_COMISIONADOS" collection
 * @method Doctrine_Collection getCOMDESTINO()            Returns the current record's "COM_DESTINO" collection
 * @method Doctrine_Collection getCOMISIONADOSPLANTA()    Returns the current record's "COMISIONADOS_PLANTA" collection
 * @method Doctrine_Collection getCOMISIONADOSCONTRATO()  Returns the current record's "COMISIONADOS_CONTRATO" collection
 * @method TRANSPORTES         setId()                    Sets the current record's "id" value
 * @method TRANSPORTES         setDescripcion()           Sets the current record's "descripcion" value
 * @method TRANSPORTES         setDESTINOSCOMISIONADOS()  Sets the current record's "DESTINOS_COMISIONADOS" collection
 * @method TRANSPORTES         setCOMDESTINO()            Sets the current record's "COM_DESTINO" collection
 * @method TRANSPORTES         setCOMISIONADOSPLANTA()    Sets the current record's "COMISIONADOS_PLANTA" collection
 * @method TRANSPORTES         setCOMISIONADOSCONTRATO()  Sets the current record's "COMISIONADOS_CONTRATO" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTRANSPORTES extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TRANSPORTES');
        $this->hasColumn('id', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('descripcion', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('aplica_tarifa_taxis', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_objeto_gasto', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('aplica_tiquete', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('aplica_solicitud', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('tarifa_transporte', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('tope_max', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('valor_auxilio', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('abreviatura', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('aplica_dias_tarifa', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('aplica_solicitud_aerea', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('aplica_solicitud_terrestre', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 8,
             ));                     
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('DESTINOS_COMISIONADOS', array(
             'local' => 'id',
             'foreign' => 'id_transporte'));

        $this->hasMany('COM_DESTINO', array(
             'local' => 'id',
             'foreign' => 'id_tipo_transporte'));

        $this->hasMany('COMISIONADOS_PLANTA', array(
             'local' => 'id',
             'foreign' => 'id_transporte'));

        $this->hasMany('COMISIONADOS_CONTRATO', array(
             'local' => 'id',
             'foreign' => 'id_transporte'));
    }
}