<?php
// Connection Component Binding
Doctrine_Manager::getInstance()->bindComponent('RVC_DECLARA_OTRA_ENTID', 'doctrine');

/**
 * BaseRVC_DECLARA_OTRA_ENTID
 * 
 * 
 * @package    ProyectoSchema
 * @subpackage model
 * @author     ManuelEnriqueParedesLopez
 * @version    SVN: $Id: Builder.php 7490 2010-03-29 19:53:27Z jwage $
 */
abstract class BaseRVC_DECLARA_OTRA_ENTID extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RVC_DECLARA_OTRA_ENTID');
        $this->hasColumn('id_declara_otra_entid', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_contratista', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('otra_entidad', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('numero_doc', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha_doc', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('observaciones', 'string', 4000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4000,
             ));
        $this->hasColumn('usuario_log', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             '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('firmado', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_firmado', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('adjunto_firmado', 'string', 200, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 200,
             ));

    }

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

        $this->hasMany('RVC_DECLARA_OTRA_ENTIDET', array(
             'local' => 'id_declara_otra_entid',
             'foreign' => 'id_declara_otra_entid'));
    }
}