<?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_rp
 * @property string $plazo
 * @property decimal $valor
 * @property timestamp $fecha_aprobacion
 * @property timestamp $fecha_pago
 * @property integer $timbre
 * @property timestamp $fecha_inicio
 * @property timestamp $fecha_terminacion
 * @property integer $id_supervisor
 * @property integer $interventoria
 * @property integer $id_interventor
 * @property string $observacion_supervisor
 * @property string $observacion_interventor
 * @property string $plazo_interventor
 * @property integer $estado
 * @property integer $activo
 * @property string $adjunto_rut
 * @property string $adjunto_contrato
 * @property string $objeto
 * @property integer $no_pagos
 * @property timestamp $fecha_anu
 * @property string $motivo_anu
 * @property integer $capacidad_contra
 * @property string $conf_juridica
 * @property integer $liquidado
 * @property CO_SELECCION_EP $CO_SELECCION_EP
 * @property CO_SEL_OFERENTE $CO_SEL_OFERENTE
 * @property CO_SUPERVISOR $CO_SUPERVISOR
 * @property CO_TIPO_CONTRATO $CO_TIPO_CONTRATO
 * @property INTERCEROS $INTERCEROS
 * @property Doctrine_Collection $CO_TERMINA_CONTRATO
 * @property Doctrine_Collection $CO_PRORROGA_CONTRATO
 * @property Doctrine_Collection $CO_MODIFICACION_CONTRATO
 * @property Doctrine_Collection $CO_LIQUIDA_CONTRATO
 * @property Doctrine_Collection $CO_EJECUCION_CONTRATO
 * @property Doctrine_Collection $CO_ADICION_CONTRATO
 * 
 * @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             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 timestamp           getFechaAprobacion()          Returns the current record's "fecha_aprobacion" value
 * @method timestamp           getFechaPago()                Returns the current record's "fecha_pago" value
 * @method integer             getTimbre()                   Returns the current record's "timbre" value
 * @method timestamp           getFechaInicio()              Returns the current record's "fecha_inicio" 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             getInterventoria()            Returns the current record's "interventoria" value
 * @method integer             getIdInterventor()            Returns the current record's "id_interventor" value
 * @method string              getObservacionSupervisor()    Returns the current record's "observacion_supervisor" value
 * @method string              getObservacionInterventor()   Returns the current record's "observacion_interventor" value
 * @method string              getPlazoInterventor()         Returns the current record's "plazo_interventor" value
 * @method integer             getEstado()                   Returns the current record's "estado" value
 * @method integer             getActivo()                   Returns the current record's "activo" value
 * @method string              getAdjuntoRut()               Returns the current record's "adjunto_rut" value
 * @method string              getAdjuntoContrato()          Returns the current record's "adjunto_contrato" value
 * @method string              getObjeto()                   Returns the current record's "objeto" value
 * @method integer             getNoPagos()                  Returns the current record's "no_pagos" value
 * @method timestamp           getFechaAnu()                 Returns the current record's "fecha_anu" value
 * @method string              getMotivoAnu()                Returns the current record's "motivo_anu" value
 * @method integer             getCapacidadContra()          Returns the current record's "capacidad_contra" value
 * @method string              getConfJuridica()             Returns the current record's "conf_juridica" value
 * @method integer             getLiquidado()                Returns the current record's "liquidado" value
 * @method CO_SELECCION_EP     getCOSELECCIONEP()            Returns the current record's "CO_SELECCION_EP" value
 * @method CO_SEL_OFERENTE     getCOSELOFERENTE()            Returns the current record's "CO_SEL_OFERENTE" value
 * @method CO_SUPERVISOR       getCOSUPERVISOR()             Returns the current record's "CO_SUPERVISOR" value
 * @method CO_TIPO_CONTRATO    getCOTIPOCONTRATO()           Returns the current record's "CO_TIPO_CONTRATO" value
 * @method INTERCEROS          getINTERCEROS()               Returns the current record's "INTERCEROS" value
 * @method Doctrine_Collection getCOTERMINACONTRATO()        Returns the current record's "CO_TERMINA_CONTRATO" collection
 * @method Doctrine_Collection getCOPRORROGACONTRATO()       Returns the current record's "CO_PRORROGA_CONTRATO" collection
 * @method Doctrine_Collection getCOMODIFICACIONCONTRATO()   Returns the current record's "CO_MODIFICACION_CONTRATO" collection
 * @method Doctrine_Collection getCOLIQUIDACONTRATO()        Returns the current record's "CO_LIQUIDA_CONTRATO" collection
 * @method Doctrine_Collection getCOEJECUCIONCONTRATO()      Returns the current record's "CO_EJECUCION_CONTRATO" collection
 * @method Doctrine_Collection getCOADICIONCONTRATO()        Returns the current record's "CO_ADICION_CONTRATO" 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         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         setFechaAprobacion()          Sets the current record's "fecha_aprobacion" value
 * @method CO_CONTRATO         setFechaPago()                Sets the current record's "fecha_pago" 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         setFechaTerminacion()         Sets the current record's "fecha_terminacion" value
 * @method CO_CONTRATO         setIdSupervisor()             Sets the current record's "id_supervisor" value
 * @method CO_CONTRATO         setInterventoria()            Sets the current record's "interventoria" 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         setObservacionInterventor()   Sets the current record's "observacion_interventor" value
 * @method CO_CONTRATO         setPlazoInterventor()         Sets the current record's "plazo_interventor" 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         setAdjuntoRut()               Sets the current record's "adjunto_rut" 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         setNoPagos()                  Sets the current record's "no_pagos" 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         setCapacidadContra()          Sets the current record's "capacidad_contra" value
 * @method CO_CONTRATO         setConfJuridica()             Sets the current record's "conf_juridica" value
 * @method CO_CONTRATO         setLiquidado()                Sets the current record's "liquidado" value
 * @method CO_CONTRATO         setCOSELECCIONEP()            Sets the current record's "CO_SELECCION_EP" value
 * @method CO_CONTRATO         setCOSELOFERENTE()            Sets the current record's "CO_SEL_OFERENTE" value
 * @method CO_CONTRATO         setCOSUPERVISOR()             Sets the current record's "CO_SUPERVISOR" value
 * @method CO_CONTRATO         setCOTIPOCONTRATO()           Sets the current record's "CO_TIPO_CONTRATO" value
 * @method CO_CONTRATO         setINTERCEROS()               Sets the current record's "INTERCEROS" value
 * @method CO_CONTRATO         setCOTERMINACONTRATO()        Sets the current record's "CO_TERMINA_CONTRATO" collection
 * @method CO_CONTRATO         setCOPRORROGACONTRATO()       Sets the current record's "CO_PRORROGA_CONTRATO" collection
 * @method CO_CONTRATO         setCOMODIFICACIONCONTRATO()   Sets the current record's "CO_MODIFICACION_CONTRATO" collection
 * @method CO_CONTRATO         setCOLIQUIDACONTRATO()        Sets the current record's "CO_LIQUIDA_CONTRATO" collection
 * @method CO_CONTRATO         setCOEJECUCIONCONTRATO()      Sets the current record's "CO_EJECUCION_CONTRATO" collection
 * @method CO_CONTRATO         setCOADICIONCONTRATO()        Sets the current record's "CO_ADICION_CONTRATO" 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 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' => true,
             '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('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' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_sel_oferente', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_rp', 'integer', 20, array(
             'notnull' => false,
             '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('fecha_aprobacion', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_pago', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('timbre', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 
                ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('fecha_inicio', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('fecha_terminacion', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('id_supervisor', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('interventoria', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_interventor', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('observacion_supervisor', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('observacion_interventor', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('plazo_interventor', 'string', 250, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 250,
             ));
        $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_rut', 'string', 250, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 250,
             ));
        $this->hasColumn('adjunto_contrato', 'string', 250, array(
             'notnull' => false,
             '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('no_pagos', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $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('capacidad_contra', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('conf_juridica', 'string', 250, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 250,
             ));
        $this->hasColumn('liquidado', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasOne('CO_SEL_OFERENTE', array(
             'local' => 'id_sel_oferente',
             'foreign' => 'id_sel_oferente'));

        $this->hasOne('CO_SUPERVISOR', array(
             'local' => 'id_supervisor',
             'foreign' => 'id_supervisor'));

        $this->hasOne('CO_TIPO_CONTRATO', array(
             'local' => 'id_tipo_contrato',
             'foreign' => 'id_tipo_contrato'));

        $this->hasOne('INTERCEROS', array(
             'local' => 'id_interventor',
             'foreign' => 'id_mae_ter'));

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

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

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

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

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

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