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

/**
 * BasePROYECTOS
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $ano_fiscal
 * @property string $descripcion
 * @property integer $id_area_lider
 * @property integer $valor_proyecto
 * @property string $codigo
 * @property integer $estado
 * @property integer $jefe_proyecto
 * @property integer $func_inv
 * @property AREAS $AREAS
 * @property Doctrine_Collection $PR_APO
 * @property Doctrine_Collection $PR_ASIG_PRESUP
 * @property Doctrine_Collection $PR_CPO_ASIGN
 * @property Doctrine_Collection $PR_DETA_REIN
 * @property Doctrine_Collection $PR_PO_SALDOS
 * @property Doctrine_Collection $PR_PROYECTO_SALDOS
 * @property Doctrine_Collection $RH_NP_CON_NOM
 * 
 * @method integer             getId()                 Returns the current record's "id" value
 * @method string              getAnoFiscal()          Returns the current record's "ano_fiscal" value
 * @method string              getDescripcion()        Returns the current record's "descripcion" value
 * @method integer             getIdAreaLider()        Returns the current record's "id_area_lider" value
 * @method integer             getValorProyecto()      Returns the current record's "valor_proyecto" value
 * @method string              getCodigo()             Returns the current record's "codigo" value
 * @method integer             getEstado()             Returns the current record's "estado" value
 * @method integer             getJefeProyecto()       Returns the current record's "jefe_proyecto" value
 * @method integer             getFuncInv()            Returns the current record's "func_inv" value
 * @method AREAS               getAREAS()              Returns the current record's "AREAS" value
 * @method Doctrine_Collection getPRAPO()              Returns the current record's "PR_APO" collection
 * @method Doctrine_Collection getPRASIGPRESUP()       Returns the current record's "PR_ASIG_PRESUP" collection
 * @method Doctrine_Collection getPRCPOASIGN()         Returns the current record's "PR_CPO_ASIGN" collection
 * @method Doctrine_Collection getPRDETAREIN()         Returns the current record's "PR_DETA_REIN" collection
 * @method Doctrine_Collection getPRPOSALDOS()         Returns the current record's "PR_PO_SALDOS" collection
 * @method Doctrine_Collection getPRPROYECTOSALDOS()   Returns the current record's "PR_PROYECTO_SALDOS" collection
 * @method Doctrine_Collection getRHNPCONNOM()         Returns the current record's "RH_NP_CON_NOM" collection
 * @method PROYECTOS           setId()                 Sets the current record's "id" value
 * @method PROYECTOS           setAnoFiscal()          Sets the current record's "ano_fiscal" value
 * @method PROYECTOS           setDescripcion()        Sets the current record's "descripcion" value
 * @method PROYECTOS           setIdAreaLider()        Sets the current record's "id_area_lider" value
 * @method PROYECTOS           setValorProyecto()      Sets the current record's "valor_proyecto" value
 * @method PROYECTOS           setCodigo()             Sets the current record's "codigo" value
 * @method PROYECTOS           setEstado()             Sets the current record's "estado" value
 * @method PROYECTOS           setJefeProyecto()       Sets the current record's "jefe_proyecto" value
 * @method PROYECTOS           setFuncInv()            Sets the current record's "func_inv" value
 * @method PROYECTOS           setAREAS()              Sets the current record's "AREAS" value
 * @method PROYECTOS           setPRAPO()              Sets the current record's "PR_APO" collection
 * @method PROYECTOS           setPRASIGPRESUP()       Sets the current record's "PR_ASIG_PRESUP" collection
 * @method PROYECTOS           setPRCPOASIGN()         Sets the current record's "PR_CPO_ASIGN" collection
 * @method PROYECTOS           setPRDETAREIN()         Sets the current record's "PR_DETA_REIN" collection
 * @method PROYECTOS           setPRPOSALDOS()         Sets the current record's "PR_PO_SALDOS" collection
 * @method PROYECTOS           setPRPROYECTOSALDOS()   Sets the current record's "PR_PROYECTO_SALDOS" collection
 * @method PROYECTOS           setRHNPCONNOM()         Sets the current record's "RH_NP_CON_NOM" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BasePROYECTOS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('PROYECTOS');
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('ano_fiscal', 'string', 4, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('id_area_lider', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('valor_proyecto', 'integer', 38, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 38,
             ));
        $this->hasColumn('codigo', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             '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('jefe_proyecto', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('func_inv', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasMany('PR_APO', array(
             'local' => 'id',
             'foreign' => 'id_cpo'));

        $this->hasMany('PR_ASIG_PRESUP', array(
             'local' => 'id',
             'foreign' => 'id_cpo'));

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

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

        $this->hasMany('PR_PO_SALDOS', array(
             'local' => 'id',
             'foreign' => 'id_cpo'));

        $this->hasMany('PR_PROYECTO_SALDOS', array(
             'local' => 'id',
             'foreign' => 'id_cpo'));

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