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

/**
 * BaseCA_FACTURA_PROD
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_factura_prod
 * @property integer $id_factura
 * @property integer $id_producto
 * @property integer $cantidad
 * @property decimal $valor_uni_bruto
 * @property decimal $valor_uni_iva
 * @property decimal $valor_uni_total
 * @property string $referencia
 * @property CA_FACTURA_POS $CA_FACTURA_POS
 * @property CA_PRODUCTO $CA_PRODUCTO
 * 
 * @method integer         getIdFacturaProd()   Returns the current record's "id_factura_prod" value
 * @method integer         getIdFactura()       Returns the current record's "id_factura" value
 * @method integer         getIdProducto()      Returns the current record's "id_producto" value
 * @method integer         getCantidad()        Returns the current record's "cantidad" value
 * @method decimal         getValorUniBruto()   Returns the current record's "valor_uni_bruto" value
 * @method decimal         getValorUniIva()     Returns the current record's "valor_uni_iva" value
 * @method decimal         getValorUniTotal()   Returns the current record's "valor_uni_total" value
 * @method string          getReferencia()      Returns the current record's "referencia" value
 * @method CA_FACTURA_POS  getCAFACTURAPOS()    Returns the current record's "CA_FACTURA_POS" value
 * @method CA_PRODUCTO     getCAPRODUCTO()      Returns the current record's "CA_PRODUCTO" value
 * @method CA_FACTURA_PROD setIdFacturaProd()   Sets the current record's "id_factura_prod" value
 * @method CA_FACTURA_PROD setIdFactura()       Sets the current record's "id_factura" value
 * @method CA_FACTURA_PROD setIdProducto()      Sets the current record's "id_producto" value
 * @method CA_FACTURA_PROD setCantidad()        Sets the current record's "cantidad" value
 * @method CA_FACTURA_PROD setValorUniBruto()   Sets the current record's "valor_uni_bruto" value
 * @method CA_FACTURA_PROD setValorUniIva()     Sets the current record's "valor_uni_iva" value
 * @method CA_FACTURA_PROD setValorUniTotal()   Sets the current record's "valor_uni_total" value
 * @method CA_FACTURA_PROD setReferencia()      Sets the current record's "referencia" value
 * @method CA_FACTURA_PROD setCAFACTURAPOS()    Sets the current record's "CA_FACTURA_POS" value
 * @method CA_FACTURA_PROD setCAPRODUCTO()      Sets the current record's "CA_PRODUCTO" value
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCA_FACTURA_PROD extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CA_FACTURA_PROD');
        $this->hasColumn('id_factura_prod', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_factura', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_producto', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('cantidad', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('valor_uni_bruto', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('valor_uni_iva', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('valor_uni_total', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('referencia', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

        $this->hasOne('CA_PRODUCTO', array(
             'local' => 'id_producto',
             'foreign' => 'id_producto'));
    }
}