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

/**
 * BaseDEPARTAMENTO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_depto
 * @property string $descripcion
 * @property integer $id_pais
 * @property string $coddepto
 * @property PAIS $PAIS
 * @property Doctrine_Collection $MUNICIPIOS
 * @property Doctrine_Collection $IN_ESTRUCTURA
 * @property Doctrine_Collection $INTERCER_REG
 * @property Doctrine_Collection $FORMACION_SUPERIOR
 * @property Doctrine_Collection $EXPERIENCIA_LABORAL
 * @property Doctrine_Collection $EDUCACION_FORMAL
 * @property Doctrine_Collection $DATOS_FUNCIONARIO
 * @property Doctrine_Collection $DATOS_FUNCIONARIO_3
 * @property Doctrine_Collection $DATOS_FAMILIAR
 * @property Doctrine_Collection $CBR_DATOS_TITULAR
 * 
 * @method integer             getIdDepto()             Returns the current record's "id_depto" value
 * @method string              getDescripcion()         Returns the current record's "descripcion" value
 * @method integer             getIdPais()              Returns the current record's "id_pais" value
 * @method string              getCoddepto()            Returns the current record's "coddepto" value
 * @method PAIS                getPAIS()                Returns the current record's "PAIS" value
 * @method Doctrine_Collection getMUNICIPIOS()          Returns the current record's "MUNICIPIOS" collection
 * @method Doctrine_Collection getINESTRUCTURA()        Returns the current record's "IN_ESTRUCTURA" collection
 * @method Doctrine_Collection getINTERCERREG()         Returns the current record's "INTERCER_REG" collection
 * @method Doctrine_Collection getFORMACIONSUPERIOR()   Returns the current record's "FORMACION_SUPERIOR" collection
 * @method Doctrine_Collection getEXPERIENCIALABORAL()  Returns the current record's "EXPERIENCIA_LABORAL" collection
 * @method Doctrine_Collection getEDUCACIONFORMAL()     Returns the current record's "EDUCACION_FORMAL" collection
 * @method Doctrine_Collection getDATOSFUNCIONARIO()    Returns the current record's "DATOS_FUNCIONARIO" collection
 * @method Doctrine_Collection getDATOSFUNCIONARIO3()   Returns the current record's "DATOS_FUNCIONARIO_3" collection
 * @method Doctrine_Collection getDATOSFAMILIAR()       Returns the current record's "DATOS_FAMILIAR" collection
 * @method Doctrine_Collection getCBRDATOSTITULAR()     Returns the current record's "CBR_DATOS_TITULAR" collection
 * @method DEPARTAMENTO        setIdDepto()             Sets the current record's "id_depto" value
 * @method DEPARTAMENTO        setDescripcion()         Sets the current record's "descripcion" value
 * @method DEPARTAMENTO        setIdPais()              Sets the current record's "id_pais" value
 * @method DEPARTAMENTO        setCoddepto()            Sets the current record's "coddepto" value
 * @method DEPARTAMENTO        setPAIS()                Sets the current record's "PAIS" value
 * @method DEPARTAMENTO        setMUNICIPIOS()          Sets the current record's "MUNICIPIOS" collection
 * @method DEPARTAMENTO        setINESTRUCTURA()        Sets the current record's "IN_ESTRUCTURA" collection
 * @method DEPARTAMENTO        setINTERCERREG()         Sets the current record's "INTERCER_REG" collection
 * @method DEPARTAMENTO        setFORMACIONSUPERIOR()   Sets the current record's "FORMACION_SUPERIOR" collection
 * @method DEPARTAMENTO        setEXPERIENCIALABORAL()  Sets the current record's "EXPERIENCIA_LABORAL" collection
 * @method DEPARTAMENTO        setEDUCACIONFORMAL()     Sets the current record's "EDUCACION_FORMAL" collection
 * @method DEPARTAMENTO        setDATOSFUNCIONARIO()    Sets the current record's "DATOS_FUNCIONARIO" collection
 * @method DEPARTAMENTO        setDATOSFUNCIONARIO3()   Sets the current record's "DATOS_FUNCIONARIO_3" collection
 * @method DEPARTAMENTO        setDATOSFAMILIAR()       Sets the current record's "DATOS_FAMILIAR" collection
 * @method DEPARTAMENTO        setCBRDATOSTITULAR()     Sets the current record's "CBR_DATOS_TITULAR" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseDEPARTAMENTO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('DEPARTAMENTO');
        $this->hasColumn('id_depto', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 30, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 30,
             ));
        $this->hasColumn('id_pais', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('coddepto', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasMany('MUNICIPIOS', array(
             'local' => 'id_depto',
             'foreign' => 'depto'));

        $this->hasMany('IN_ESTRUCTURA', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto'));

        $this->hasMany('INTERCER_REG', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto'));

        $this->hasMany('FORMACION_SUPERIOR', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto'));

        $this->hasMany('EXPERIENCIA_LABORAL', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto'));

        $this->hasMany('EDUCACION_FORMAL', array(
             'local' => 'id_depto',
             'foreign' => 'departamento'));

        $this->hasMany('DATOS_FUNCIONARIO', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto_nace'));

        $this->hasMany('DATOS_FUNCIONARIO as DATOS_FUNCIONARIO_3', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto_dir'));

        $this->hasMany('DATOS_FAMILIAR', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto_nace'));

        $this->hasMany('CBR_DATOS_TITULAR', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto'));
    }
}