<?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 PAIS $PAIS
 * @property Doctrine_Collection $EXPERIENCIA_LABORAL
 * @property Doctrine_Collection $FORMACION_SUPERIOR
 * @property Doctrine_Collection $INTERCER_REG
 * @property Doctrine_Collection $MUNICIPIOS
 * @property Doctrine_Collection $DATOS_FAMILIAR
 * @property Doctrine_Collection $DATOS_FUNCIONARIO
 * @property Doctrine_Collection $DATOS_FUNCIONARIO_2
 * @property Doctrine_Collection $EDUCACION_FORMAL
 * 
 * @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 PAIS                getPAIS()                Returns the current record's "PAIS" value
 * @method Doctrine_Collection getEXPERIENCIALABORAL()  Returns the current record's "EXPERIENCIA_LABORAL" collection
 * @method Doctrine_Collection getFORMACIONSUPERIOR()   Returns the current record's "FORMACION_SUPERIOR" collection
 * @method Doctrine_Collection getINTERCERREG()         Returns the current record's "INTERCER_REG" collection
 * @method Doctrine_Collection getMUNICIPIOS()          Returns the current record's "MUNICIPIOS" collection
 * @method Doctrine_Collection getDATOSFAMILIAR()       Returns the current record's "DATOS_FAMILIAR" collection
 * @method Doctrine_Collection getDATOSFUNCIONARIO()    Returns the current record's "DATOS_FUNCIONARIO" collection
 * @method Doctrine_Collection getDATOSFUNCIONARIO2()   Returns the current record's "DATOS_FUNCIONARIO_2" collection
 * @method Doctrine_Collection getEDUCACIONFORMAL()     Returns the current record's "EDUCACION_FORMAL" 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        setPAIS()                Sets the current record's "PAIS" value
 * @method DEPARTAMENTO        setEXPERIENCIALABORAL()  Sets the current record's "EXPERIENCIA_LABORAL" collection
 * @method DEPARTAMENTO        setFORMACIONSUPERIOR()   Sets the current record's "FORMACION_SUPERIOR" collection
 * @method DEPARTAMENTO        setINTERCERREG()         Sets the current record's "INTERCER_REG" collection
 * @method DEPARTAMENTO        setMUNICIPIOS()          Sets the current record's "MUNICIPIOS" collection
 * @method DEPARTAMENTO        setDATOSFAMILIAR()       Sets the current record's "DATOS_FAMILIAR" collection
 * @method DEPARTAMENTO        setDATOSFUNCIONARIO()    Sets the current record's "DATOS_FUNCIONARIO" collection
 * @method DEPARTAMENTO        setDATOSFUNCIONARIO2()   Sets the current record's "DATOS_FUNCIONARIO_2" collection
 * @method DEPARTAMENTO        setEDUCACIONFORMAL()     Sets the current record's "EDUCACION_FORMAL" collection
 * 
 * @package    cartera
 * @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(
             '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,
             ));
    }

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

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

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

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

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

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

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

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

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