<?php

// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('CO_CONTRATO_SIRECI_SGR', 'doctrine');
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BaseCO_CONTRATO_SIRECI_SGR
 *
 * @author  ManuelEnrique Paredes Lopez
 */
abstract class BaseCO_CONTRATO_SIRECI_SGR extends sfDoctrineRecord {

    public function setTableDefinition() {

        $this->setTableName('CO_CONTRATO_SIRECI_SGR');

        $this->hasColumn('id_contrato_sireci_sgr', 'integer', 20, array(
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => true,
            'length' => 20,
        ));

        $this->hasColumn('id_contrato', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('no_contrato', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));

        $this->hasColumn('justificacion', 'string', 250, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 250,
        ));



        $this->hasColumn('clase_contrato', 'integer', 20, array(
            'notnull' => false,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));





        $this->hasColumn('otra_clase_contrato', 'string', 250, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 250,
        ));



        $this->hasColumn('pago_anticipado', 'string', 250, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 250,
        ));

        $this->hasColumn('valor_pago_anticipado', 'decimal', 20, array(
            'notnull' => false,
            'type' => 'decimal',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));


        $this->hasColumn('ejecucion_fis_contrato', 'decimal', 20, array(
            'notnull' => false,
            'type' => 'decimal',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));


        $this->hasColumn('observaciones', 'string', 512, array(
            'notnull' => false,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 512,
        ));
    }
    
    
    
       public function setUp() {
        parent::setUp();
        
        
         $this->hasMany('CO_CONTRATO', array(
             'local' => 'id_contrato',
             'foreign' => 'id_contrato'));
    }

}
