<?php

Doctrine_Manager::getInstance()->bindComponent('CO_CONTRATO_SECOP', '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_SECOP
 *
 * @author ManuelENriqueParedesLopez
 */
abstract class BaseCO_CONTRATO_SECOP extends sfDoctrineRecord {

    public function setTableDefinition() {
        $this->setTableName('CO_CONTRATO_SECOP');

        $this->hasColumn('id_contrato_secop', '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('no_contrato_secop', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));

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

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

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

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

        $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('ubicacion_url_secop', 'string', 256, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 256,
        ));
        $this->hasColumn('observaciones', 'string', 4000, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 256,
        ));
        $this->hasColumn('COD_NAC_UNIDAS', 'string', 20, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 256,
        ));
    }

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

}
