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

/**
 * BaseCA_TIPO_CALCULO
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_tipo_calculo
 * @property string $codigo
 * @property string $descripcion
 * @property integer $id_producto
 * @property string $comando
 * @property CA_PRODUCTO $CA_PRODUCTO
 * @property Doctrine_Collection $CA_FORMULA
 * 
 * @method integer             getIdTipoCalculo()   Returns the current record's "id_tipo_calculo" value
 * @method string              getCodigo()          Returns the current record's "codigo" value
 * @method string              getDescripcion()     Returns the current record's "descripcion" value
 * @method integer             getIdProducto()      Returns the current record's "id_producto" value
 * @method string              getComando()         Returns the current record's "comando" value
 * @method CA_PRODUCTO         getCAPRODUCTO()      Returns the current record's "CA_PRODUCTO" value
 * @method Doctrine_Collection getCAFORMULA()       Returns the current record's "CA_FORMULA" collection
 * @method CA_TIPO_CALCULO     setIdTipoCalculo()   Sets the current record's "id_tipo_calculo" value
 * @method CA_TIPO_CALCULO     setCodigo()          Sets the current record's "codigo" value
 * @method CA_TIPO_CALCULO     setDescripcion()     Sets the current record's "descripcion" value
 * @method CA_TIPO_CALCULO     setIdProducto()      Sets the current record's "id_producto" value
 * @method CA_TIPO_CALCULO     setComando()         Sets the current record's "comando" value
 * @method CA_TIPO_CALCULO     setCAPRODUCTO()      Sets the current record's "CA_PRODUCTO" value
 * @method CA_TIPO_CALCULO     setCAFORMULA()       Sets the current record's "CA_FORMULA" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_TIPO_CALCULO extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_TIPO_CALCULO');
        $this->hasColumn('id_tipo_calculo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_producto', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('comando', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasMany('CA_FORMULA', array(
             'local' => 'id_tipo_calculo',
             'foreign' => 'id_tipo_calculo'));
    }
}