<?php

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

/**
 * BaseCO_CARAC_DETALLE_HIJOS
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Manuel Enrique Paredes Lopez
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCO_CARAC_DETALLE_HIJOS extends sfDoctrineRecord {

    public function setTableDefinition() {
        $this->setTableName('CO_CARAC_DETALLE_HIJOS');
        $this->hasColumn('id_carac_detalle_hijos', 'integer', 20, array(
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => true,
            'length' => 20,
        ));
        $this->hasColumn('id_carac_contratista', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('id_tipo_iden', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('num_doc', 'string', 20, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('nombre', 'string', 2000, array(
            'notnull' => true,
            'type' => 'string',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 2000,
        ));
        $this->hasColumn('genero', 'integer', 20, array(
            'notnull' => true,
            'type' => 'integer',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 20,
        ));
        $this->hasColumn('fecha_nacimiento', 'timestamp', 7, array(
            'notnull' => false,
            'type' => 'timestamp',
            'fixed' => 0,
            'unsigned' => false,
            'primary' => false,
            'length' => 7,
        ));
    }

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

}
