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

/**
 * BaseCA_TIPO_CALCULO
 * 
 *
 */
abstract class BaseCA_TIPO_CALCULO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_TIPO_CALCULO');
        $this->hasColumn('id_tipo_calculo', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('codigo', 'string', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 250, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 250,
             ));
        $this->hasColumn('id_producto', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        
    }

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