<?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 $COM_DESTINO
 * @property Doctrine_Collection $COM_DESTINO_3
 * @property Doctrine_Collection $CBR_DATOS_TITULAR
 * 
 * @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 getCOMDESTINO()        Returns the current record's "COM_DESTINO" collection
 * @method Doctrine_Collection getCOMDESTINO3()       Returns the current record's "COM_DESTINO_3" collection
 * @method Doctrine_Collection getCBRDATOSTITULAR()   Returns the current record's "CBR_DATOS_TITULAR" 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          setCOMDESTINO()        Sets the current record's "COM_DESTINO" collection
 * @method MUNICIPIOS          setCOMDESTINO3()       Sets the current record's "COM_DESTINO_3" collection
 * @method MUNICIPIOS          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 BaseMUNICIPIOS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('MUNICIPIOS');
        $this->hasColumn('codmun', 'integer', 20, array(
             'notnull' => false,
             '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,
             ));
        $this->hasColumn('valor_transporte', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('zona_roja', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('observaciones', 'string', 2000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2000,
             ));
    }

    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('COM_DESTINO', array(
             'local' => 'codmun',
             'foreign' => 'destino_ini'));

        $this->hasMany('COM_DESTINO as COM_DESTINO_3', array(
             'local' => 'codmun',
             'foreign' => 'destino_fin'));

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