<?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 integer $estado
 * @property Doctrine_Collection $PR_PG
 * @property Doctrine_Collection $PROYECTOS
 * @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 integer             getEstado()          Returns the current record's "estado" value
 * @method Doctrine_Collection getPRPG()            Returns the current record's "PR_PG" collection
 * @method Doctrine_Collection getPROYECTOS()       Returns the current record's "PROYECTOS" 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               setEstado()          Sets the current record's "estado" value
 * @method AREAS               setPRPG()            Sets the current record's "PR_PG" collection
 * @method AREAS               setPROYECTOS()       Sets the current record's "PROYECTOS" collection
 * @method AREAS               setCAPRODUCTO()      Sets the current record's "CA_PRODUCTO" collection
 * 
 * @package    controlComisiones
 * @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,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1 ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

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

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