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

/**
 * BasePR_ELEMENTOS_GASTO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_elementos_gasto
 * @property string $codigo_gasto
 * @property string $descripcion_gasto
 * @property integer $id_objeto_gasto
 * @property integer $viatico
 * @property OBJETOS_GASTO $OBJETOS_GASTO
 * @property Doctrine_Collection $COM_REGISTRO_GASTO
 * 
 * @method integer             getIdElementosGasto()   Returns the current record's "id_elementos_gasto" value
 * @method string              getCodigoGasto()        Returns the current record's "codigo_gasto" value
 * @method string              getDescripcionGasto()   Returns the current record's "descripcion_gasto" value
 * @method integer             getIdObjetoGasto()      Returns the current record's "id_objeto_gasto" value
 * @method integer             getViatico()            Returns the current record's "viatico" value
 * @method OBJETOS_GASTO       getOBJETOSGASTO()       Returns the current record's "OBJETOS_GASTO" value
 * @method Doctrine_Collection getCOMREGISTROGASTO()   Returns the current record's "COM_REGISTRO_GASTO" collection
 * @method PR_ELEMENTOS_GASTO  setIdElementosGasto()   Sets the current record's "id_elementos_gasto" value
 * @method PR_ELEMENTOS_GASTO  setCodigoGasto()        Sets the current record's "codigo_gasto" value
 * @method PR_ELEMENTOS_GASTO  setDescripcionGasto()   Sets the current record's "descripcion_gasto" value
 * @method PR_ELEMENTOS_GASTO  setIdObjetoGasto()      Sets the current record's "id_objeto_gasto" value
 * @method PR_ELEMENTOS_GASTO  setViatico()            Sets the current record's "viatico" value
 * @method PR_ELEMENTOS_GASTO  setOBJETOSGASTO()       Sets the current record's "OBJETOS_GASTO" value
 * @method PR_ELEMENTOS_GASTO  setCOMREGISTROGASTO()   Sets the current record's "COM_REGISTRO_GASTO" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_ELEMENTOS_GASTO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_ELEMENTOS_GASTO');
        $this->hasColumn('id_elementos_gasto', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo_gasto', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion_gasto', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('id_objeto_gasto', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('viatico', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('viaje', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasMany('COM_REGISTRO_GASTO', array(
             'local' => 'id_elementos_gasto',
             'foreign' => 'id_elementos_gasto'));
    }
}