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

/**
 * BaseCA_FORMULA
 * 
 *
 */
abstract class BaseCA_FORMULA extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_FORMULA');
        $this->hasColumn('id_formula', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_tipo_calculo', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('formula', 'string', 2048, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2048,
             ));
        $this->hasColumn('nombre', 'string', 64, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 64,
             ));
        
    }

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