<?php

// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('CBR_REGISTRO_ETAPA', 'doctrine');

/**
 * BaseCBR_REGISTRO_ETAPA
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_registro_etapa
 * @property integer $id_proceso_coactivo
 * @property integer $id_actuacion_proc
 * @property integer $numero
 * @property timestamp $fecha
 * @property string $observaciones
 * @property clob $detalle_plantilla
 * @property CBR_PROCESO_COACTIVO $CBR_PROCESO_COACTIVO
 * @property Doctrine_Collection $CBR_OFICIO_ETAPA
 * 
 * @method integer              getIdRegistroEtapa()      Returns the current record's "id_registro_etapa" value
 * @method integer              getIdProcesoCoactivo()    Returns the current record's "id_proceso_coactivo" value
 * @method integer              getIdActuacionProc()      Returns the current record's "id_actuacion_proc" value
 * @method integer              getNumero()               Returns the current record's "numero" value
 * @method timestamp            getFecha()                Returns the current record's "fecha" value
 * @method string               getObservaciones()        Returns the current record's "observaciones" value
 * @method clob                 getDetallePlantilla()     Returns the current record's "detalle_plantilla" value
 * @method CBR_PROCESO_COACTIVO getCBRPROCESOCOACTIVO()   Returns the current record's "CBR_PROCESO_COACTIVO" value
 * @method Doctrine_Collection  getCBROFICIOETAPA()       Returns the current record's "CBR_OFICIO_ETAPA" collection
 * @method CBR_REGISTRO_ETAPA   setIdRegistroEtapa()      Sets the current record's "id_registro_etapa" value
 * @method CBR_REGISTRO_ETAPA   setIdProcesoCoactivo()    Sets the current record's "id_proceso_coactivo" value
 * @method CBR_REGISTRO_ETAPA   setIdActuacionProc()      Sets the current record's "id_actuacion_proc" value
 * @method CBR_REGISTRO_ETAPA   setNumero()               Sets the current record's "numero" value
 * @method CBR_REGISTRO_ETAPA   setFecha()                Sets the current record's "fecha" value
 * @method CBR_REGISTRO_ETAPA   setObservaciones()        Sets the current record's "observaciones" value
 * @method CBR_REGISTRO_ETAPA   setDetallePlantilla()     Sets the current record's "detalle_plantilla" value
 * @method CBR_REGISTRO_ETAPA   setCBRPROCESOCOACTIVO()   Sets the current record's "CBR_PROCESO_COACTIVO" value
 * @method CBR_REGISTRO_ETAPA   setCBROFICIOETAPA()       Sets the current record's "CBR_OFICIO_ETAPA" 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 BaseCBR_REGISTRO_ETAPA extends sfDoctrineRecord {

    public function setTableDefinition() {
        $this->setTableName('CBR_REGISTRO_ETAPA');
        $this->hasColumn('id_registro_etapa', 'integer', 20, array(
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => true,
            'length' => 20,
        ));
        $this->hasColumn('id_proceso_coactivo', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('id_actuacion_proc', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('numero', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
            'notnull' => true,
            'type' => 'timestamp',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 7,
        ));
        $this->hasColumn('observaciones', 'string', 500, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 500,
        ));
        $this->hasColumn('adjunto', 'string', 150, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 150,
        ));
        $this->hasColumn('detalle_plantilla', 'clob', 4000, array(
            'notnull' => true,
            'type' => 'clob',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 4000,
        ));
        $this->hasColumn('id_plantilla', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('estado', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('fecha_log', 'timestamp', 7, array(
            'notnull' => true,
            'type' => 'timestamp',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 7,
        ));
        $this->hasColumn('usuario_log', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('fecha_aprueba', 'timestamp', 7, array(
            'notnull' => true,
            'type' => 'timestamp',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 7,
        ));
        $this->hasColumn('usuario_aprueba', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
    }

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

        $this->hasMany('CBR_OFICIO_ETAPA', array(
            'local' => 'id_registro_etapa',
            'foreign' => 'id_registro_etapa'));
    }

}
