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

/**
 * BaseCOMISIONES
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codare
 * @property string $tipcomi
 * @property string $codpro
 * @property timestamp $fecha
 * @property string $objetivo
 * @property string $actividad
 * @property string $observa
 * @property timestamp $created_at
 * @property timestamp $update_at
 * @property integer $username
 * @property integer $estado
 * @property integer $activo
 * @property integer $vigencia
 * @property string $justificacion
 * @property string $interrupcion
 * @property integer $id_original
 * @property string $destinos_add
 * @property TIPOS_COMISION $TIPOS_COMISION
 * @property Doctrine_Collection $TARIFAS_DESTINO
 * @property Doctrine_Collection $TARIFAS_DESTINO_2
 * @property Doctrine_Collection $TARIFAS_DESTINO_3
 * @property Doctrine_Collection $TARIFAS_DESTINO_4
 * @property Doctrine_Collection $COMISIONADOS_CONTRATO
 * @property Doctrine_Collection $COMISIONADOS_CONTRATO_2
 * @property Doctrine_Collection $COMISIONADOS_CONTRATO_3
 * @property Doctrine_Collection $COMISIONADOS_CONTRATO_4
 * @property Doctrine_Collection $COMISIONADOS_OBJS
 * @property Doctrine_Collection $COMISIONADOS_OBJS_2
 * @property Doctrine_Collection $COMISIONADOS_OBJS_3
 * @property Doctrine_Collection $COMISIONADOS_OBJS_4
 * @property Doctrine_Collection $COMISIONADOS_PLANTA
 * @property Doctrine_Collection $COMISIONADOS_PLANTA_2
 * @property Doctrine_Collection $COMISIONADOS_PLANTA_3
 * @property Doctrine_Collection $COMISIONADOS_PLANTA_4
 * @property Doctrine_Collection $DESTINOS
 * @property Doctrine_Collection $DESTINOS_2
 * @property Doctrine_Collection $DESTINOS_3
 * @property Doctrine_Collection $DESTINOS_4
 * @property Doctrine_Collection $DESTINOS_COMISIONADOS
 * @property Doctrine_Collection $DESTINOS_COMISIONADOS_2
 * @property Doctrine_Collection $DESTINOS_COMISIONADOS_3
 * @property Doctrine_Collection $DESTINOS_COMISIONADOS_4
 * 
 * @method integer             getId()                      Returns the current record's "id" value
 * @method string              getCodare()                  Returns the current record's "codare" value
 * @method string              getTipcomi()                 Returns the current record's "tipcomi" value
 * @method string              getCodpro()                  Returns the current record's "codpro" value
 * @method timestamp           getFecha()                   Returns the current record's "fecha" value
 * @method string              getObjetivo()                Returns the current record's "objetivo" value
 * @method string              getActividad()               Returns the current record's "actividad" value
 * @method string              getObserva()                 Returns the current record's "observa" value
 * @method timestamp           getCreatedAt()               Returns the current record's "created_at" value
 * @method timestamp           getUpdateAt()                Returns the current record's "update_at" value
 * @method integer             getUsername()                Returns the current record's "username" value
 * @method integer             getEstado()                  Returns the current record's "estado" value
 * @method integer             getActivo()                  Returns the current record's "activo" value
 * @method integer             getVigencia()                Returns the current record's "vigencia" value
 * @method string              getJustificacion()           Returns the current record's "justificacion" value
 * @method string              getInterrupcion()            Returns the current record's "interrupcion" value
 * @method integer             getIdOriginal()              Returns the current record's "id_original" value
 * @method string              getDestinosAdd()             Returns the current record's "destinos_add" value
 * @method TIPOS_COMISION      getTIPOSCOMISION()           Returns the current record's "TIPOS_COMISION" value
 * @method Doctrine_Collection getTARIFASDESTINO()          Returns the current record's "TARIFAS_DESTINO" collection
 * @method Doctrine_Collection getTARIFASDESTINO2()         Returns the current record's "TARIFAS_DESTINO_2" collection
 * @method Doctrine_Collection getTARIFASDESTINO3()         Returns the current record's "TARIFAS_DESTINO_3" collection
 * @method Doctrine_Collection getTARIFASDESTINO4()         Returns the current record's "TARIFAS_DESTINO_4" collection
 * @method Doctrine_Collection getCOMISIONADOSCONTRATO()    Returns the current record's "COMISIONADOS_CONTRATO" collection
 * @method Doctrine_Collection getCOMISIONADOSCONTRATO2()   Returns the current record's "COMISIONADOS_CONTRATO_2" collection
 * @method Doctrine_Collection getCOMISIONADOSCONTRATO3()   Returns the current record's "COMISIONADOS_CONTRATO_3" collection
 * @method Doctrine_Collection getCOMISIONADOSCONTRATO4()   Returns the current record's "COMISIONADOS_CONTRATO_4" collection
 * @method Doctrine_Collection getCOMISIONADOSOBJS()        Returns the current record's "COMISIONADOS_OBJS" collection
 * @method Doctrine_Collection getCOMISIONADOSOBJS2()       Returns the current record's "COMISIONADOS_OBJS_2" collection
 * @method Doctrine_Collection getCOMISIONADOSOBJS3()       Returns the current record's "COMISIONADOS_OBJS_3" collection
 * @method Doctrine_Collection getCOMISIONADOSOBJS4()       Returns the current record's "COMISIONADOS_OBJS_4" collection
 * @method Doctrine_Collection getCOMISIONADOSPLANTA()      Returns the current record's "COMISIONADOS_PLANTA" collection
 * @method Doctrine_Collection getCOMISIONADOSPLANTA2()     Returns the current record's "COMISIONADOS_PLANTA_2" collection
 * @method Doctrine_Collection getCOMISIONADOSPLANTA3()     Returns the current record's "COMISIONADOS_PLANTA_3" collection
 * @method Doctrine_Collection getCOMISIONADOSPLANTA4()     Returns the current record's "COMISIONADOS_PLANTA_4" collection
 * @method Doctrine_Collection getDESTINOS()                Returns the current record's "DESTINOS" collection
 * @method Doctrine_Collection getDESTINOS2()               Returns the current record's "DESTINOS_2" collection
 * @method Doctrine_Collection getDESTINOS3()               Returns the current record's "DESTINOS_3" collection
 * @method Doctrine_Collection getDESTINOS4()               Returns the current record's "DESTINOS_4" collection
 * @method Doctrine_Collection getDESTINOSCOMISIONADOS()    Returns the current record's "DESTINOS_COMISIONADOS" collection
 * @method Doctrine_Collection getDESTINOSCOMISIONADOS2()   Returns the current record's "DESTINOS_COMISIONADOS_2" collection
 * @method Doctrine_Collection getDESTINOSCOMISIONADOS3()   Returns the current record's "DESTINOS_COMISIONADOS_3" collection
 * @method Doctrine_Collection getDESTINOSCOMISIONADOS4()   Returns the current record's "DESTINOS_COMISIONADOS_4" collection
 * @method COMISIONES          setId()                      Sets the current record's "id" value
 * @method COMISIONES          setCodare()                  Sets the current record's "codare" value
 * @method COMISIONES          setTipcomi()                 Sets the current record's "tipcomi" value
 * @method COMISIONES          setCodpro()                  Sets the current record's "codpro" value
 * @method COMISIONES          setFecha()                   Sets the current record's "fecha" value
 * @method COMISIONES          setObjetivo()                Sets the current record's "objetivo" value
 * @method COMISIONES          setActividad()               Sets the current record's "actividad" value
 * @method COMISIONES          setObserva()                 Sets the current record's "observa" value
 * @method COMISIONES          setCreatedAt()               Sets the current record's "created_at" value
 * @method COMISIONES          setUpdateAt()                Sets the current record's "update_at" value
 * @method COMISIONES          setUsername()                Sets the current record's "username" value
 * @method COMISIONES          setEstado()                  Sets the current record's "estado" value
 * @method COMISIONES          setActivo()                  Sets the current record's "activo" value
 * @method COMISIONES          setVigencia()                Sets the current record's "vigencia" value
 * @method COMISIONES          setJustificacion()           Sets the current record's "justificacion" value
 * @method COMISIONES          setInterrupcion()            Sets the current record's "interrupcion" value
 * @method COMISIONES          setIdOriginal()              Sets the current record's "id_original" value
 * @method COMISIONES          setDestinosAdd()             Sets the current record's "destinos_add" value
 * @method COMISIONES          setTIPOSCOMISION()           Sets the current record's "TIPOS_COMISION" value
 * @method COMISIONES          setTARIFASDESTINO()          Sets the current record's "TARIFAS_DESTINO" collection
 * @method COMISIONES          setTARIFASDESTINO2()         Sets the current record's "TARIFAS_DESTINO_2" collection
 * @method COMISIONES          setTARIFASDESTINO3()         Sets the current record's "TARIFAS_DESTINO_3" collection
 * @method COMISIONES          setTARIFASDESTINO4()         Sets the current record's "TARIFAS_DESTINO_4" collection
 * @method COMISIONES          setCOMISIONADOSCONTRATO()    Sets the current record's "COMISIONADOS_CONTRATO" collection
 * @method COMISIONES          setCOMISIONADOSCONTRATO2()   Sets the current record's "COMISIONADOS_CONTRATO_2" collection
 * @method COMISIONES          setCOMISIONADOSCONTRATO3()   Sets the current record's "COMISIONADOS_CONTRATO_3" collection
 * @method COMISIONES          setCOMISIONADOSCONTRATO4()   Sets the current record's "COMISIONADOS_CONTRATO_4" collection
 * @method COMISIONES          setCOMISIONADOSOBJS()        Sets the current record's "COMISIONADOS_OBJS" collection
 * @method COMISIONES          setCOMISIONADOSOBJS2()       Sets the current record's "COMISIONADOS_OBJS_2" collection
 * @method COMISIONES          setCOMISIONADOSOBJS3()       Sets the current record's "COMISIONADOS_OBJS_3" collection
 * @method COMISIONES          setCOMISIONADOSOBJS4()       Sets the current record's "COMISIONADOS_OBJS_4" collection
 * @method COMISIONES          setCOMISIONADOSPLANTA()      Sets the current record's "COMISIONADOS_PLANTA" collection
 * @method COMISIONES          setCOMISIONADOSPLANTA2()     Sets the current record's "COMISIONADOS_PLANTA_2" collection
 * @method COMISIONES          setCOMISIONADOSPLANTA3()     Sets the current record's "COMISIONADOS_PLANTA_3" collection
 * @method COMISIONES          setCOMISIONADOSPLANTA4()     Sets the current record's "COMISIONADOS_PLANTA_4" collection
 * @method COMISIONES          setDESTINOS()                Sets the current record's "DESTINOS" collection
 * @method COMISIONES          setDESTINOS2()               Sets the current record's "DESTINOS_2" collection
 * @method COMISIONES          setDESTINOS3()               Sets the current record's "DESTINOS_3" collection
 * @method COMISIONES          setDESTINOS4()               Sets the current record's "DESTINOS_4" collection
 * @method COMISIONES          setDESTINOSCOMISIONADOS()    Sets the current record's "DESTINOS_COMISIONADOS" collection
 * @method COMISIONES          setDESTINOSCOMISIONADOS2()   Sets the current record's "DESTINOS_COMISIONADOS_2" collection
 * @method COMISIONES          setDESTINOSCOMISIONADOS3()   Sets the current record's "DESTINOS_COMISIONADOS_3" collection
 * @method COMISIONES          setDESTINOSCOMISIONADOS4()   Sets the current record's "DESTINOS_COMISIONADOS_4" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCOMISIONES extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('COMISIONES');
        $this->hasColumn('id', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('codare', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('tipcomi', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('codpro', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('objetivo', 'string', 600, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 600,
             ));
        $this->hasColumn('actividad', 'string', 700, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 700,
             ));
        $this->hasColumn('observa', 'string', 2000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2000,
             ));
        $this->hasColumn('created_at', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('update_at', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('username', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('activo', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('vigencia', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('justificacion', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('interrupcion', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 1,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_original', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('destinos_add', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
    }

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

        $this->hasMany('TARIFAS_DESTINO', array(
             'local' => 'id',
             'foreign' => 'id_comision'));

        $this->hasMany('TARIFAS_DESTINO as TARIFAS_DESTINO_2', array(
             'local' => 'id',
             'foreign' => 'vigencia'));

        $this->hasMany('TARIFAS_DESTINO as TARIFAS_DESTINO_3', array(
             'local' => 'vigencia',
             'foreign' => 'id_comision'));

        $this->hasMany('TARIFAS_DESTINO as TARIFAS_DESTINO_4', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

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

        $this->hasMany('COMISIONADOS_CONTRATO as COMISIONADOS_CONTRATO_2', array(
             'local' => 'id',
             'foreign' => 'vigencia'));

        $this->hasMany('COMISIONADOS_CONTRATO as COMISIONADOS_CONTRATO_3', array(
             'local' => 'vigencia',
             'foreign' => 'id_comision'));

        $this->hasMany('COMISIONADOS_CONTRATO as COMISIONADOS_CONTRATO_4', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

        $this->hasMany('COMISIONADOS_OBJS', array(
             'local' => 'id',
             'foreign' => 'id_comision'));

        $this->hasMany('COMISIONADOS_OBJS as COMISIONADOS_OBJS_2', array(
             'local' => 'id',
             'foreign' => 'vigencia'));

        $this->hasMany('COMISIONADOS_OBJS as COMISIONADOS_OBJS_3', array(
             'local' => 'vigencia',
             'foreign' => 'id_comision'));

        $this->hasMany('COMISIONADOS_OBJS as COMISIONADOS_OBJS_4', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

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

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

        $this->hasMany('COMISIONADOS_PLANTA as COMISIONADOS_PLANTA_3', array(
             'local' => 'vigencia',
             'foreign' => 'id_comision'));

        $this->hasMany('COMISIONADOS_PLANTA as COMISIONADOS_PLANTA_4', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

        $this->hasMany('DESTINOS', array(
             'local' => 'id',
             'foreign' => 'id_comision'));

        $this->hasMany('DESTINOS as DESTINOS_2', array(
             'local' => 'id',
             'foreign' => 'vigencia'));

        $this->hasMany('DESTINOS as DESTINOS_3', array(
             'local' => 'vigencia',
             'foreign' => 'id_comision'));

        $this->hasMany('DESTINOS as DESTINOS_4', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));

        $this->hasMany('DESTINOS_COMISIONADOS', array(
             'local' => 'id',
             'foreign' => 'id_comision'));

        $this->hasMany('DESTINOS_COMISIONADOS as DESTINOS_COMISIONADOS_2', array(
             'local' => 'id',
             'foreign' => 'vigencia'));

        $this->hasMany('DESTINOS_COMISIONADOS as DESTINOS_COMISIONADOS_3', array(
             'local' => 'vigencia',
             'foreign' => 'id_comision'));

        $this->hasMany('DESTINOS_COMISIONADOS as DESTINOS_COMISIONADOS_4', array(
             'local' => 'vigencia',
             'foreign' => 'vigencia'));
    }
}