<?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 DEPARTAMENTO $DEPARTAMENTO
 * @property Doctrine_Collection $INTERCER_REG
 * @property Doctrine_Collection $EDUCACION_FORMAL
 * 
 * @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 DEPARTAMENTO        getDEPARTAMENTO()     Returns the current record's "DEPARTAMENTO" value
 * @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 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          setDEPARTAMENTO()     Sets the current record's "DEPARTAMENTO" value
 * @method MUNICIPIOS          setINTERCERREG()      Sets the current record's "INTERCER_REG" collection
 * @method MUNICIPIOS          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 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,
             ));
    }

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

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

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