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

/**
 * BaseAREAS
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_area
 * @property string $descripcion
 * @property string $sigla
 * @property integer $id_dependencia
 * @property string $codigo
 * @property integer $id_nivel
 * @property integer $id_ordenador
 * @property string $cargo_ordenador
 * @property decimal $valor_tope
 * @property Doctrine_Collection $PROYECTOS
 * @property Doctrine_Collection $PR_PG
 * @property Doctrine_Collection $RH_NP_LEY_AREA
 * @property Doctrine_Collection $CA_PRODUCTO
 * 
 * @method integer             getIdArea()          Returns the current record's "id_area" value
 * @method string              getDescripcion()     Returns the current record's "descripcion" value
 * @method string              getSigla()           Returns the current record's "sigla" value
 * @method integer             getIdDependencia()   Returns the current record's "id_dependencia" value
 * @method string              getCodigo()          Returns the current record's "codigo" value
 * @method integer             getIdNivel()         Returns the current record's "id_nivel" value
 * @method integer             getIdOrdenador()     Returns the current record's "id_ordenador" value
 * @method string              getCargoOrdenador()  Returns the current record's "cargo_ordenador" value
 * @method decimal             getValorTope()       Returns the current record's "valor_tope" value
 * @method Doctrine_Collection getPROYECTOS()       Returns the current record's "PROYECTOS" collection
 * @method Doctrine_Collection getPRPG()            Returns the current record's "PR_PG" collection
 * @method Doctrine_Collection getRHNPLEYAREA()     Returns the current record's "RH_NP_LEY_AREA" collection
 * @method Doctrine_Collection getCAPRODUCTO()      Returns the current record's "CA_PRODUCTO" collection
 * @method AREAS               setIdArea()          Sets the current record's "id_area" value
 * @method AREAS               setDescripcion()     Sets the current record's "descripcion" value
 * @method AREAS               setSigla()           Sets the current record's "sigla" value
 * @method AREAS               setIdDependencia()   Sets the current record's "id_dependencia" value
 * @method AREAS               setCodigo()          Sets the current record's "codigo" value
 * @method AREAS               setIdNivel()         Sets the current record's "id_nivel" value
 * @method AREAS               setIdOrdenador()     Sets the current record's "id_ordenador" value
 * @method AREAS               setCargoOrdenador()  Sets the current record's "cargo_ordenador" value
 * @method AREAS               setValorTope()       Sets the current record's "valor_tope" value
 * @method AREAS               setPROYECTOS()       Sets the current record's "PROYECTOS" collection
 * @method AREAS               setPRPG()            Sets the current record's "PR_PG" collection
 * @method AREAS               setRHNPLEYAREA()     Sets the current record's "RH_NP_LEY_AREA" collection
 * @method AREAS               setCAPRODUCTO()      Sets the current record's "CA_PRODUCTO" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseAREAS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('AREAS');
        $this->hasColumn('id_area', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('sigla', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('id_dependencia', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('id_nivel', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_ordenador', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cargo_ordenador', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));
        $this->hasColumn('valor_tope', 'decimal', 38, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 38,
             ));
    }

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

        $this->hasMany('PR_PG', array(
             'local' => 'id_area',
             'foreign' => 'id_area'));

        $this->hasMany('RH_NP_LEY_AREA', array(
             'local' => 'id_area',
             'foreign' => 'id_area'));

        $this->hasMany('CA_PRODUCTO', array(
             'local' => 'id_area',
             'foreign' => 'id_area'));
    }
}