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

/**
 * BasePR_PG
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_pg
 * @property integer $id_rp
 * @property integer $id_cdp
 * @property decimal $valor_compromiso
 * @property decimal $valor_mensual
 * @property integer $id_clase_admin
 * @property integer $no_acto_admin
 * @property timestamp $fecha_inicio
 * @property timestamp $fecha_fin
 * @property integer $meses
 * @property integer $dias
 * @property integer $id_ciudad
 * @property integer $id_area
 * @property integer $id_tercero
 * @property integer $id_mp
 * @property integer $id_ts_bn
 * @property integer $id_ts_cb
 * @property integer $id_vigencia
 * @property string $vigencia
 * @property integer $id_tipo_traba_contra
 * @property CIUDAD $CIUDAD
 * @property INTERCEROS $INTERCEROS
 * @property PR_CLASE_ACT_ADMIN $PR_CLASE_ACT_ADMIN
 * @property PR_MP $PR_MP
 * @property TS_BN $TS_BN
 * @property TS_CB $TS_CB
 * @property VIGENCIA $VIGENCIA
 * @property PR_TIPO_TRABA_CONTRA $PR_TIPO_TRABA_CONTRA
 * @property AREAS $AREAS
 * 
 * @method integer              getIdPg()                 Returns the current record's "id_pg" value
 * @method integer              getIdRp()                 Returns the current record's "id_rp" value
 * @method integer              getIdCdp()                Returns the current record's "id_cdp" value
 * @method decimal              getValorCompromiso()      Returns the current record's "valor_compromiso" value
 * @method decimal              getValorMensual()         Returns the current record's "valor_mensual" value
 * @method integer              getIdClaseAdmin()         Returns the current record's "id_clase_admin" value
 * @method integer              getNoActoAdmin()          Returns the current record's "no_acto_admin" value
 * @method timestamp            getFechaInicio()          Returns the current record's "fecha_inicio" value
 * @method timestamp            getFechaFin()             Returns the current record's "fecha_fin" value
 * @method integer              getMeses()                Returns the current record's "meses" value
 * @method integer              getDias()                 Returns the current record's "dias" value
 * @method integer              getIdCiudad()             Returns the current record's "id_ciudad" value
 * @method integer              getIdArea()               Returns the current record's "id_area" value
 * @method integer              getIdTercero()            Returns the current record's "id_tercero" value
 * @method integer              getIdMp()                 Returns the current record's "id_mp" value
 * @method integer              getIdTsBn()               Returns the current record's "id_ts_bn" value
 * @method integer              getIdTsCb()               Returns the current record's "id_ts_cb" value
 * @method integer              getIdVigencia()           Returns the current record's "id_vigencia" value
 * @method string               getVigencia()             Returns the current record's "vigencia" value
 * @method integer              getIdTipoTrabaContra()    Returns the current record's "id_tipo_traba_contra" value
 * @method CIUDAD               getCIUDAD()               Returns the current record's "CIUDAD" value
 * @method INTERCEROS           getINTERCEROS()           Returns the current record's "INTERCEROS" value
 * @method PR_CLASE_ACT_ADMIN   getPRCLASEACTADMIN()      Returns the current record's "PR_CLASE_ACT_ADMIN" value
 * @method PR_MP                getPRMP()                 Returns the current record's "PR_MP" value
 * @method TS_BN                getTSBN()                 Returns the current record's "TS_BN" value
 * @method TS_CB                getTSCB()                 Returns the current record's "TS_CB" value
 * @method VIGENCIA             getVIGENCIA()             Returns the current record's "VIGENCIA" value
 * @method PR_TIPO_TRABA_CONTRA getPRTIPOTRABACONTRA()    Returns the current record's "PR_TIPO_TRABA_CONTRA" value
 * @method AREAS                getAREAS()                Returns the current record's "AREAS" value
 * @method PR_PG                setIdPg()                 Sets the current record's "id_pg" value
 * @method PR_PG                setIdRp()                 Sets the current record's "id_rp" value
 * @method PR_PG                setIdCdp()                Sets the current record's "id_cdp" value
 * @method PR_PG                setValorCompromiso()      Sets the current record's "valor_compromiso" value
 * @method PR_PG                setValorMensual()         Sets the current record's "valor_mensual" value
 * @method PR_PG                setIdClaseAdmin()         Sets the current record's "id_clase_admin" value
 * @method PR_PG                setNoActoAdmin()          Sets the current record's "no_acto_admin" value
 * @method PR_PG                setFechaInicio()          Sets the current record's "fecha_inicio" value
 * @method PR_PG                setFechaFin()             Sets the current record's "fecha_fin" value
 * @method PR_PG                setMeses()                Sets the current record's "meses" value
 * @method PR_PG                setDias()                 Sets the current record's "dias" value
 * @method PR_PG                setIdCiudad()             Sets the current record's "id_ciudad" value
 * @method PR_PG                setIdArea()               Sets the current record's "id_area" value
 * @method PR_PG                setIdTercero()            Sets the current record's "id_tercero" value
 * @method PR_PG                setIdMp()                 Sets the current record's "id_mp" value
 * @method PR_PG                setIdTsBn()               Sets the current record's "id_ts_bn" value
 * @method PR_PG                setIdTsCb()               Sets the current record's "id_ts_cb" value
 * @method PR_PG                setIdVigencia()           Sets the current record's "id_vigencia" value
 * @method PR_PG                setVigencia()             Sets the current record's "vigencia" value
 * @method PR_PG                setIdTipoTrabaContra()    Sets the current record's "id_tipo_traba_contra" value
 * @method PR_PG                setCIUDAD()               Sets the current record's "CIUDAD" value
 * @method PR_PG                setINTERCEROS()           Sets the current record's "INTERCEROS" value
 * @method PR_PG                setPRCLASEACTADMIN()      Sets the current record's "PR_CLASE_ACT_ADMIN" value
 * @method PR_PG                setPRMP()                 Sets the current record's "PR_MP" value
 * @method PR_PG                setTSBN()                 Sets the current record's "TS_BN" value
 * @method PR_PG                setTSCB()                 Sets the current record's "TS_CB" value
 * @method PR_PG                setVIGENCIA()             Sets the current record's "VIGENCIA" value
 * @method PR_PG                setPRTIPOTRABACONTRA()    Sets the current record's "PR_TIPO_TRABA_CONTRA" value
 * @method PR_PG                setAREAS()                Sets the current record's "AREAS" value
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePR_PG extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PR_PG');
        $this->hasColumn('id_pg', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_rp', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_cdp', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_compromiso', 'decimal', 38, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 38,
             ));
        $this->hasColumn('valor_mensual', 'decimal', 38, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 38,
             ));
        $this->hasColumn('id_clase_admin', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('no_acto_admin', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_inicio', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_fin', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('meses', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('dias', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_ciudad', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_area', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tercero', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_mp', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_ts_bn', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_ts_cb', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_vigencia', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('vigencia', 'string', 4, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $this->hasColumn('id_tipo_traba_contra', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

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

        $this->hasOne('PR_CLASE_ACT_ADMIN', array(
             'local' => 'id_clase_admin',
             'foreign' => 'id'));

        $this->hasOne('PR_MP', array(
             'local' => 'id_mp',
             'foreign' => 'id_mp'));

        $this->hasOne('TS_BN', array(
             'local' => 'id_ts_bn',
             'foreign' => 'id_bn'));

        $this->hasOne('TS_CB', array(
             'local' => 'id_ts_cb',
             'foreign' => 'id_cb'));

        $this->hasOne('VIGENCIA', array(
             'local' => 'id_vigencia',
             'foreign' => 'id_vigencia'));

        $this->hasOne('PR_TIPO_TRABA_CONTRA', array(
             'local' => 'id_tipo_traba_contra',
             'foreign' => 'id_tipo_traba_contra'));

        $this->hasOne('AREAS', array(
             'local' => 'id_area',
             'foreign' => 'id_area'));
    }
}