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

/**
 * BaseIN_ESTRUCTURA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_estructura
 * @property integer $id_tipo_estructura
 * @property integer $id_cen_op
 * @property string $nombre
 * @property string $direccion
 * @property integer $codmun
 * @property integer $estado
 * @property integer $id_depto
 * @property CENTRO_OPERACION $CENTRO_OPERACION
 * @property DEPARTAMENTO $DEPARTAMENTO
 * @property MUNICIPIOS $MUNICIPIOS
 * @property Doctrine_Collection $IN_TOMA_INVENTARIO
 * @property Doctrine_Collection $IN_ESPACIO
 * 
 * @method integer             getIdEstructura()       Returns the current record's "id_estructura" value
 * @method integer             getIdTipoEstructura()   Returns the current record's "id_tipo_estructura" value
 * @method integer             getIdCenOp()            Returns the current record's "id_cen_op" value
 * @method string              getNombre()             Returns the current record's "nombre" value
 * @method string              getDireccion()          Returns the current record's "direccion" value
 * @method integer             getCodmun()             Returns the current record's "codmun" value
 * @method integer             getEstado()             Returns the current record's "estado" value
 * @method integer             getIdDepto()            Returns the current record's "id_depto" value
 * @method CENTRO_OPERACION    getCENTROOPERACION()    Returns the current record's "CENTRO_OPERACION" value
 * @method DEPARTAMENTO        getDEPARTAMENTO()       Returns the current record's "DEPARTAMENTO" value
 * @method MUNICIPIOS          getMUNICIPIOS()         Returns the current record's "MUNICIPIOS" value
 * @method Doctrine_Collection getINTOMAINVENTARIO()   Returns the current record's "IN_TOMA_INVENTARIO" collection
 * @method Doctrine_Collection getINESPACIO()          Returns the current record's "IN_ESPACIO" collection
 * @method IN_ESTRUCTURA       setIdEstructura()       Sets the current record's "id_estructura" value
 * @method IN_ESTRUCTURA       setIdTipoEstructura()   Sets the current record's "id_tipo_estructura" value
 * @method IN_ESTRUCTURA       setIdCenOp()            Sets the current record's "id_cen_op" value
 * @method IN_ESTRUCTURA       setNombre()             Sets the current record's "nombre" value
 * @method IN_ESTRUCTURA       setDireccion()          Sets the current record's "direccion" value
 * @method IN_ESTRUCTURA       setCodmun()             Sets the current record's "codmun" value
 * @method IN_ESTRUCTURA       setEstado()             Sets the current record's "estado" value
 * @method IN_ESTRUCTURA       setIdDepto()            Sets the current record's "id_depto" value
 * @method IN_ESTRUCTURA       setCENTROOPERACION()    Sets the current record's "CENTRO_OPERACION" value
 * @method IN_ESTRUCTURA       setDEPARTAMENTO()       Sets the current record's "DEPARTAMENTO" value
 * @method IN_ESTRUCTURA       setMUNICIPIOS()         Sets the current record's "MUNICIPIOS" value
 * @method IN_ESTRUCTURA       setINTOMAINVENTARIO()   Sets the current record's "IN_TOMA_INVENTARIO" collection
 * @method IN_ESTRUCTURA       setINESPACIO()          Sets the current record's "IN_ESPACIO" collection
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseIN_ESTRUCTURA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('IN_ESTRUCTURA');
        $this->hasColumn('id_estructura', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_tipo_estructura', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_cen_op', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('nombre', 'string', 500, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('direccion', 'string', 500, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('codmun', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_depto', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasOne('DEPARTAMENTO', array(
             'local' => 'id_depto',
             'foreign' => 'id_depto'));

        $this->hasOne('MUNICIPIOS', array(
             'local' => 'codmun',
             'foreign' => 'codmun'));

        $this->hasMany('IN_TOMA_INVENTARIO', array(
             'local' => 'id_estructura',
             'foreign' => 'id_estructura'));

        $this->hasMany('IN_ESPACIO', array(
             'local' => 'id_estructura',
             'foreign' => 'id_estructura'));
    }
}