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

/**
 * BaseMUNICIPIOS
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $codmun
 * @property string $municipio
 * @property integer $depto
 * @property string $codmun_text
 * @property DEPARTAMENTO $DEPARTAMENTO
 * @property Doctrine_Collection $IN_ESTRUCTURA
 * @property Doctrine_Collection $INTERCER_REG
 * @property Doctrine_Collection $EDUCACION_FORMAL
 * @property Doctrine_Collection $CENTRO_OPERACION
 * 
 * @method integer             getCodmun()           Returns the current record's "codmun" value
 * @method string              getMunicipio()        Returns the current record's "municipio" value
 * @method integer             getDepto()            Returns the current record's "depto" value
 * @method string              getCodmunText()       Returns the current record's "codmun_text" value
 * @method DEPARTAMENTO        getDEPARTAMENTO()     Returns the current record's "DEPARTAMENTO" value
 * @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 getEDUCACIONFORMAL()  Returns the current record's "EDUCACION_FORMAL" collection
 * @method Doctrine_Collection getCENTROOPERACION()  Returns the current record's "CENTRO_OPERACION" collection
 * @method MUNICIPIOS          setCodmun()           Sets the current record's "codmun" value
 * @method MUNICIPIOS          setMunicipio()        Sets the current record's "municipio" value
 * @method MUNICIPIOS          setDepto()            Sets the current record's "depto" value
 * @method MUNICIPIOS          setCodmunText()       Sets the current record's "codmun_text" value
 * @method MUNICIPIOS          setDEPARTAMENTO()     Sets the current record's "DEPARTAMENTO" value
 * @method MUNICIPIOS          setINESTRUCTURA()     Sets the current record's "IN_ESTRUCTURA" collection
 * @method MUNICIPIOS          setINTERCERREG()      Sets the current record's "INTERCER_REG" collection
 * @method MUNICIPIOS          setEDUCACIONFORMAL()  Sets the current record's "EDUCACION_FORMAL" collection
 * @method MUNICIPIOS          setCENTROOPERACION()  Sets the current record's "CENTRO_OPERACION" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseMUNICIPIOS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('MUNICIPIOS');
        $this->hasColumn('codmun', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('municipio', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('depto', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('codmun_text', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

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

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

        $this->hasMany('EDUCACION_FORMAL', array(
             'local' => 'codmun',
             'foreign' => 'municipio'));

        $this->hasMany('CENTRO_OPERACION', array(
             'local' => 'codmun',
             'foreign' => 'codmun'));
    }
}