<?php

// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('OBJETOS_GASTO', 'doctrine');

/**
 * BaseOBJETOS_GASTO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $ano_fiscal
 * @property string $codigo
 * @property string $descripcion
 * @property string $abreviatura
 * @property integer $comision
 * @property integer $estado
 * @property integer $tipo
 * @property integer $viatico
 * @property integer $viaje
 * @property Doctrine_Collection $PR_PO_SALDOS
 * @property Doctrine_Collection $PR_ELEMENTOS_GASTO
 * @property Doctrine_Collection $PR_DETA_REIN
 * @property Doctrine_Collection $PR_CPO_ASIGN
 * @property Doctrine_Collection $PR_CG_MF
 * @property Doctrine_Collection $PR_ASIGNA_OBJ_GASTO
 * @property Doctrine_Collection $COM_DETA_REINTEGRO
 * @property Doctrine_Collection $COM_DETA_REEMBOLSO
 * @property Doctrine_Collection $COM_DETA_CUENTA
 * @property Doctrine_Collection $COM_DETALLE_PRESUP
 * @property Doctrine_Collection $COM_COMISIONADO_OBJ
 * 
 * @method integer             getId()                  Returns the current record's "id" value
 * @method string              getAnoFiscal()           Returns the current record's "ano_fiscal" value
 * @method string              getCodigo()              Returns the current record's "codigo" value
 * @method string              getDescripcion()         Returns the current record's "descripcion" value
 * @method string              getAbreviatura()         Returns the current record's "abreviatura" value
 * @method integer             getComision()            Returns the current record's "comision" value
 * @method integer             getEstado()              Returns the current record's "estado" value
 * @method integer             getTipo()                Returns the current record's "tipo" value
 * @method integer             getViatico()             Returns the current record's "viatico" value
 * @method integer             getViaje()               Returns the current record's "viaje" value
 * @method Doctrine_Collection getPRPOSALDOS()          Returns the current record's "PR_PO_SALDOS" collection
 * @method Doctrine_Collection getPRELEMENTOSGASTO()    Returns the current record's "PR_ELEMENTOS_GASTO" collection
 * @method Doctrine_Collection getPRDETAREIN()          Returns the current record's "PR_DETA_REIN" collection
 * @method Doctrine_Collection getPRCPOASIGN()          Returns the current record's "PR_CPO_ASIGN" collection
 * @method Doctrine_Collection getPRCGMF()              Returns the current record's "PR_CG_MF" collection
 * @method Doctrine_Collection getPRASIGNAOBJGASTO()    Returns the current record's "PR_ASIGNA_OBJ_GASTO" collection
 * @method Doctrine_Collection getCOMDETAREINTEGRO()    Returns the current record's "COM_DETA_REINTEGRO" collection
 * @method Doctrine_Collection getCOMDETAREEMBOLSO()    Returns the current record's "COM_DETA_REEMBOLSO" collection
 * @method Doctrine_Collection getCOMDETACUENTA()       Returns the current record's "COM_DETA_CUENTA" collection
 * @method Doctrine_Collection getCOMDETALLEPRESUP()    Returns the current record's "COM_DETALLE_PRESUP" collection
 * @method Doctrine_Collection getCOMCOMISIONADOOBJ()   Returns the current record's "COM_COMISIONADO_OBJ" collection
 * @method OBJETOS_GASTO       setId()                  Sets the current record's "id" value
 * @method OBJETOS_GASTO       setAnoFiscal()           Sets the current record's "ano_fiscal" value
 * @method OBJETOS_GASTO       setCodigo()              Sets the current record's "codigo" value
 * @method OBJETOS_GASTO       setDescripcion()         Sets the current record's "descripcion" value
 * @method OBJETOS_GASTO       setAbreviatura()         Sets the current record's "abreviatura" value
 * @method OBJETOS_GASTO       setComision()            Sets the current record's "comision" value
 * @method OBJETOS_GASTO       setEstado()              Sets the current record's "estado" value
 * @method OBJETOS_GASTO       setTipo()                Sets the current record's "tipo" value
 * @method OBJETOS_GASTO       setViatico()             Sets the current record's "viatico" value
 * @method OBJETOS_GASTO       setViaje()               Sets the current record's "viaje" value
 * @method OBJETOS_GASTO       setPRPOSALDOS()          Sets the current record's "PR_PO_SALDOS" collection
 * @method OBJETOS_GASTO       setPRELEMENTOSGASTO()    Sets the current record's "PR_ELEMENTOS_GASTO" collection
 * @method OBJETOS_GASTO       setPRDETAREIN()          Sets the current record's "PR_DETA_REIN" collection
 * @method OBJETOS_GASTO       setPRCPOASIGN()          Sets the current record's "PR_CPO_ASIGN" collection
 * @method OBJETOS_GASTO       setPRCGMF()              Sets the current record's "PR_CG_MF" collection
 * @method OBJETOS_GASTO       setPRASIGNAOBJGASTO()    Sets the current record's "PR_ASIGNA_OBJ_GASTO" collection
 * @method OBJETOS_GASTO       setCOMDETAREINTEGRO()    Sets the current record's "COM_DETA_REINTEGRO" collection
 * @method OBJETOS_GASTO       setCOMDETAREEMBOLSO()    Sets the current record's "COM_DETA_REEMBOLSO" collection
 * @method OBJETOS_GASTO       setCOMDETACUENTA()       Sets the current record's "COM_DETA_CUENTA" collection
 * @method OBJETOS_GASTO       setCOMDETALLEPRESUP()    Sets the current record's "COM_DETALLE_PRESUP" collection
 * @method OBJETOS_GASTO       setCOMCOMISIONADOOBJ()   Sets the current record's "COM_COMISIONADO_OBJ" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseOBJETOS_GASTO extends sfDoctrineRecord {

    public function setTableDefinition() {
        $this->setTableName('OBJETOS_GASTO');
        $this->hasColumn('id', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => true,
            'length' => 20,
        ));
        $this->hasColumn('ano_fiscal', 'string', 4, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 4,
        ));
        $this->hasColumn('codigo', 'string', 20, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('descripcion', 'string', 100, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 100,
        ));
        $this->hasColumn('abreviatura', 'string', 21, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 21,
        ));
        $this->hasColumn('comision', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('estado', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('tipo', 'integer', 20, array(
            'notnull' => false,
            '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,
        ));
        $this->hasColumn('id_tipo_comisionado', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
    }

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

        $this->hasMany('PR_ELEMENTOS_GASTO', array(
            'local' => 'id',
            'foreign' => 'id_objeto_gasto'));

        $this->hasMany('PR_DETA_REIN', array(
            'local' => 'id',
            'foreign' => 'id_obj_gasto'));

        $this->hasMany('PR_CPO_ASIGN', array(
            'local' => 'id',
            'foreign' => 'id_obj_gasto'));

        $this->hasMany('PR_CG_MF', array(
            'local' => 'id',
            'foreign' => 'id_obj_gasto'));

        $this->hasMany('PR_ASIGNA_OBJ_GASTO', array(
            'local' => 'id',
            'foreign' => 'id_obj_gasto'));

        $this->hasMany('COM_DETA_REINTEGRO', array(
            'local' => 'id',
            'foreign' => 'id_obj_gasto'));

        $this->hasMany('COM_DETA_REEMBOLSO', array(
            'local' => 'id',
            'foreign' => 'id_obj_gasto'));

        $this->hasMany('COM_DETA_CUENTA', array(
            'local' => 'id',
            'foreign' => 'id_obj_gasto'));

        $this->hasMany('COM_DETALLE_PRESUP', array(
            'local' => 'id',
            'foreign' => 'id_obj_gasto'));

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

}
