<?php

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

/**
 * BaseCO_CONTRATO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_contrato
 * @property integer $no_contrato
 * @property integer $id_anhos
 * @property integer $id_seleccion_ep
 * @property integer $id_tipo_contrato
 * @property integer $id_sel_oferente
 * @property integer $id_contratista
 * @property integer $id_rp
 * @property string $plazo
 * @property decimal $valor
 * @property integer $estado
 * @property integer $activo
 * @property timestamp $fecha_aprobacion
 * @property timestamp $fecha_pago
 * @property string $adjunto_contrato
 * @property string $objeto
 * @property integer $timbre
 * @property timestamp $fecha_inicio
 * @property timestamp $fecha_anu
 * @property string $motivo_anu
 * @property timestamp $fecha_terminacion
 * @property integer $id_supervisor
 * @property integer $liquidado
 * @property integer $interventoria
 * @property integer $id_ordenador_gasto
 * @property integer $id_tipo_convenio
 * @property integer $id_interventor
 * @property string $observacion_supervisor
 * @property integer $valor_anticipo
 * @property string $observacion_interventor
 * @property integer $porcentaje_anticipo
 * @property string $plazo_interventor
 * @property integer $id_inicio_contrato
 * @property integer $terminacion
 * @property integer $dias_plazo
 * @property integer $meses_plazo
 * @property string $adjunto_rut
 * @property integer $anhos_plazo
 * @property integer $liquidacion
 * @property integer $meses_liquida
 * @property integer $no_pagos
 * @property integer $capacidad_contra
 * @property string $conf_juridica
 * @property Doctrine_Collection $CO_TERMINA_CONTRATO
 * @property Doctrine_Collection $CO_LEGALIZA_CONTRATO
 * @property Doctrine_Collection $CO_EJECUCION_CONTRATO
 * @property Doctrine_Collection $CO_AMPARO_CONT
 * 
 * @method integer             getIdContrato()              Returns the current record's "id_contrato" value
 * @method integer             getNoContrato()              Returns the current record's "no_contrato" value
 * @method integer             getIdAnhos()                 Returns the current record's "id_anhos" value
 * @method integer             getIdSeleccionEp()           Returns the current record's "id_seleccion_ep" value
 * @method integer             getIdTipoContrato()          Returns the current record's "id_tipo_contrato" value
 * @method integer             getIdSelOferente()           Returns the current record's "id_sel_oferente" value
 * @method integer             getIdContratista()           Returns the current record's "id_contratista" value
 * @method integer             getIdRp()                    Returns the current record's "id_rp" value
 * @method string              getPlazo()                   Returns the current record's "plazo" value
 * @method decimal             getValor()                   Returns the current record's "valor" value
 * @method integer             getEstado()                  Returns the current record's "estado" value
 * @method integer             getActivo()                  Returns the current record's "activo" value
 * @method timestamp           getFechaAprobacion()         Returns the current record's "fecha_aprobacion" value
 * @method timestamp           getFechaPago()               Returns the current record's "fecha_pago" value
 * @method string              getAdjuntoContrato()         Returns the current record's "adjunto_contrato" value
 * @method string              getObjeto()                  Returns the current record's "objeto" value
 * @method integer             getTimbre()                  Returns the current record's "timbre" value
 * @method timestamp           getFechaInicio()             Returns the current record's "fecha_inicio" value
 * @method timestamp           getFechaAnu()                Returns the current record's "fecha_anu" value
 * @method string              getMotivoAnu()               Returns the current record's "motivo_anu" value
 * @method timestamp           getFechaTerminacion()        Returns the current record's "fecha_terminacion" value
 * @method integer             getIdSupervisor()            Returns the current record's "id_supervisor" value
 * @method integer             getLiquidado()               Returns the current record's "liquidado" value
 * @method integer             getInterventoria()           Returns the current record's "interventoria" value
 * @method integer             getIdOrdenadorGasto()        Returns the current record's "id_ordenador_gasto" value
 * @method integer             getIdTipoConvenio()          Returns the current record's "id_tipo_convenio" value
 * @method integer             getIdInterventor()           Returns the current record's "id_interventor" value
 * @method string              getObservacionSupervisor()   Returns the current record's "observacion_supervisor" value
 * @method integer             getValorAnticipo()           Returns the current record's "valor_anticipo" value
 * @method string              getObservacionInterventor()  Returns the current record's "observacion_interventor" value
 * @method integer             getPorcentajeAnticipo()      Returns the current record's "porcentaje_anticipo" value
 * @method string              getPlazoInterventor()        Returns the current record's "plazo_interventor" value
 * @method integer             getIdInicioContrato()        Returns the current record's "id_inicio_contrato" value
 * @method integer             getTerminacion()             Returns the current record's "terminacion" value
 * @method integer             getDiasPlazo()               Returns the current record's "dias_plazo" value
 * @method integer             getMesesPlazo()              Returns the current record's "meses_plazo" value
 * @method string              getAdjuntoRut()              Returns the current record's "adjunto_rut" value
 * @method integer             getAnhosPlazo()              Returns the current record's "anhos_plazo" value
 * @method integer             getLiquidacion()             Returns the current record's "liquidacion" value
 * @method integer             getMesesLiquida()            Returns the current record's "meses_liquida" value
 * @method integer             getNoPagos()                 Returns the current record's "no_pagos" value
 * @method integer             getCapacidadContra()         Returns the current record's "capacidad_contra" value
 * @method string              getConfJuridica()            Returns the current record's "conf_juridica" value
 * @method Doctrine_Collection getCOTERMINACONTRATO()       Returns the current record's "CO_TERMINA_CONTRATO" collection
 * @method Doctrine_Collection getCOLEGALIZACONTRATO()      Returns the current record's "CO_LEGALIZA_CONTRATO" collection
 * @method Doctrine_Collection getCOEJECUCIONCONTRATO()     Returns the current record's "CO_EJECUCION_CONTRATO" collection
 * @method Doctrine_Collection getCOAMPAROCONT()            Returns the current record's "CO_AMPARO_CONT" collection
 * @method CO_CONTRATO         setIdContrato()              Sets the current record's "id_contrato" value
 * @method CO_CONTRATO         setNoContrato()              Sets the current record's "no_contrato" value
 * @method CO_CONTRATO         setIdAnhos()                 Sets the current record's "id_anhos" value
 * @method CO_CONTRATO         setIdSeleccionEp()           Sets the current record's "id_seleccion_ep" value
 * @method CO_CONTRATO         setIdTipoContrato()          Sets the current record's "id_tipo_contrato" value
 * @method CO_CONTRATO         setIdSelOferente()           Sets the current record's "id_sel_oferente" value
 * @method CO_CONTRATO         setIdContratista()           Sets the current record's "id_contratista" value
 * @method CO_CONTRATO         setIdRp()                    Sets the current record's "id_rp" value
 * @method CO_CONTRATO         setPlazo()                   Sets the current record's "plazo" value
 * @method CO_CONTRATO         setValor()                   Sets the current record's "valor" value
 * @method CO_CONTRATO         setEstado()                  Sets the current record's "estado" value
 * @method CO_CONTRATO         setActivo()                  Sets the current record's "activo" value
 * @method CO_CONTRATO         setFechaAprobacion()         Sets the current record's "fecha_aprobacion" value
 * @method CO_CONTRATO         setFechaPago()               Sets the current record's "fecha_pago" value
 * @method CO_CONTRATO         setAdjuntoContrato()         Sets the current record's "adjunto_contrato" value
 * @method CO_CONTRATO         setObjeto()                  Sets the current record's "objeto" value
 * @method CO_CONTRATO         setTimbre()                  Sets the current record's "timbre" value
 * @method CO_CONTRATO         setFechaInicio()             Sets the current record's "fecha_inicio" value
 * @method CO_CONTRATO         setFechaAnu()                Sets the current record's "fecha_anu" value
 * @method CO_CONTRATO         setMotivoAnu()               Sets the current record's "motivo_anu" value
 * @method CO_CONTRATO         setFechaTerminacion()        Sets the current record's "fecha_terminacion" value
 * @method CO_CONTRATO         setIdSupervisor()            Sets the current record's "id_supervisor" value
 * @method CO_CONTRATO         setLiquidado()               Sets the current record's "liquidado" value
 * @method CO_CONTRATO         setInterventoria()           Sets the current record's "interventoria" value
 * @method CO_CONTRATO         setIdOrdenadorGasto()        Sets the current record's "id_ordenador_gasto" value
 * @method CO_CONTRATO         setIdTipoConvenio()          Sets the current record's "id_tipo_convenio" value
 * @method CO_CONTRATO         setIdInterventor()           Sets the current record's "id_interventor" value
 * @method CO_CONTRATO         setObservacionSupervisor()   Sets the current record's "observacion_supervisor" value
 * @method CO_CONTRATO         setValorAnticipo()           Sets the current record's "valor_anticipo" value
 * @method CO_CONTRATO         setObservacionInterventor()  Sets the current record's "observacion_interventor" value
 * @method CO_CONTRATO         setPorcentajeAnticipo()      Sets the current record's "porcentaje_anticipo" value
 * @method CO_CONTRATO         setPlazoInterventor()        Sets the current record's "plazo_interventor" value
 * @method CO_CONTRATO         setIdInicioContrato()        Sets the current record's "id_inicio_contrato" value
 * @method CO_CONTRATO         setTerminacion()             Sets the current record's "terminacion" value
 * @method CO_CONTRATO         setDiasPlazo()               Sets the current record's "dias_plazo" value
 * @method CO_CONTRATO         setMesesPlazo()              Sets the current record's "meses_plazo" value
 * @method CO_CONTRATO         setAdjuntoRut()              Sets the current record's "adjunto_rut" value
 * @method CO_CONTRATO         setAnhosPlazo()              Sets the current record's "anhos_plazo" value
 * @method CO_CONTRATO         setLiquidacion()             Sets the current record's "liquidacion" value
 * @method CO_CONTRATO         setMesesLiquida()            Sets the current record's "meses_liquida" value
 * @method CO_CONTRATO         setNoPagos()                 Sets the current record's "no_pagos" value
 * @method CO_CONTRATO         setCapacidadContra()         Sets the current record's "capacidad_contra" value
 * @method CO_CONTRATO         setConfJuridica()            Sets the current record's "conf_juridica" value
 * @method CO_CONTRATO         setCOTERMINACONTRATO()       Sets the current record's "CO_TERMINA_CONTRATO" collection
 * @method CO_CONTRATO         setCOLEGALIZACONTRATO()      Sets the current record's "CO_LEGALIZA_CONTRATO" collection
 * @method CO_CONTRATO         setCOEJECUCIONCONTRATO()     Sets the current record's "CO_EJECUCION_CONTRATO" collection
 * @method CO_CONTRATO         setCOAMPAROCONT()            Sets the current record's "CO_AMPARO_CONT" collection
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCO_CONTRATO extends sfDoctrineRecord {

    public function setTableDefinition() {
        $this->setTableName('CO_CONTRATO');
        $this->hasColumn('id_contrato', 'integer', 20, array(
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => true,
            'length' => 20,
        ));
        $this->hasColumn('no_contrato', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('id_anhos', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('fecha_contrato', 'timestamp', 7, array(
            'notnull' => true,
            'type' => 'timestamp',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 7,
        ));
        $this->hasColumn('id_seleccion_ep', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('id_tipo_contrato', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('id_contratista', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('id_categoria', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('plazo', 'string', 250, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 250,
        ));
        $this->hasColumn('valor', 'decimal', 20, array(
            'notnull' => true,
            'type' => 'decimal',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('estado', 'integer', 1, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '1 ',
            'primary' => false,
            'length' => 1,
        ));
        $this->hasColumn('activo', 'integer', 1, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '1 ',
            'primary' => false,
            'length' => 1,
        ));
        $this->hasColumn('adjunto_contrato', 'string', 250, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 250,
        ));
        $this->hasColumn('objeto', 'string', 4000, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 4000,
        ));
        $this->hasColumn('fecha_anu', 'timestamp', 7, array(
            'notnull' => false,
            'type' => 'timestamp',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 7,
        ));
        $this->hasColumn('motivo_anu', 'string', 500, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 500,
        ));
        $this->hasColumn('liquidado', 'integer', 1, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '0',
            'primary' => false,
            'length' => 1,
        ));
        $this->hasColumn('id_ordenador_gasto', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('id_tipo_convenio', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('valor_anticipo', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('porcentaje_anticipo', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('id_inicio_contrato', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('terminacion', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('dias_plazo', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('meses_plazo', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('anhos_plazo', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('liquidacion', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('meses_liquida', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('carta_aceptacion', 'integer', 1, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '0',
            'primary' => false,
            'length' => 1,
        ));
        $this->hasColumn('adjunto_resolucion', 'string', 250, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 250,
        ));
        $this->hasColumn('consideraciones', 'text', array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 4000,
        ));
        $this->hasColumn('perfeccionamiento_ejec', 'text', array(
            'notnull' => false,
            'type' => 'text',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
                //'length' => 4000,
        ));
        $this->hasColumn('obliga_gen_contratista', 'text', array(
            'notnull' => false,
            'type' => 'text',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
                //'length' => 4000,
        ));

        $this->hasColumn('valor_texto', 'text', array(
            'notnull' => false,
            'type' => 'text',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
                //'length' => 4000,
        ));

        $this->hasColumn('supervisor', 'text', array(
            'notnull' => false,
            'type' => 'text',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
                //'length' => 4000,
        ));

        $this->hasColumn('fecha_secop', 'timestamp', 7, array(
            'notnull' => false,
            'type' => 'timestamp',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 7,
        ));

        $this->hasColumn('fecha_liquidacion_cont', 'timestamp', 7, array(
            'notnull' => false,
            'type' => 'timestamp',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 7,
        ));
        $this->hasColumn('valor_mensual', 'decimal', 20, array(
            'notnull' => false,
            'type' => 'decimal',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('orden_compra', 'integer', 1, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '0',
            'primary' => false,
            'length' => 1,
        ));
        $this->hasColumn('numero_pago', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('apoyo_supervisor', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('aplica_estampilla', 'integer', 1, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'default' => '0',
            'primary' => false,
            'length' => 1,
        ));
        $this->hasColumn('id_benef_estampilla', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('valor_primer_pago', 'decimal', 20, array(
            'notnull' => false,
            'type' => 'decimal',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));

    }

    public function setUp() {
        parent::setUp();
        $this->hasMany('CO_TERMINA_CONTRATO', array(
            'local' => 'id_contrato',
            'foreign' => 'id_solicitud_terminacion'));

        $this->hasMany('CO_LEGALIZA_CONTRATO', array(
            'local' => 'id_contrato',
            'foreign' => 'id_contrato'));

        $this->hasMany('CO_EJECUCION_CONTRATO', array(
            'local' => 'id_contrato',
            'foreign' => 'id_contrato'));

        $this->hasMany('CO_AMPARO_CONT', array(
            'local' => 'id_contrato',
            'foreign' => 'id_contrato'));
    }

}
