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

/**
 * BaseRE_DESCUENTOS
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_descto
 * @property string $cod_descto
 * @property string $descripcion
 * @property string $desc_corta
 * @property decimal $porcentaje
 * @property integer $id_mae_ter
 * @property integer $estado
 * @property integer $afecta_base
 * @property INTERCEROS $INTERCEROS
 * @property Doctrine_Collection $RE_OBL_DETALLE
 * @property Doctrine_Collection $RE_LIQ_DESCTO
 * 
 * @method integer             getIdDescto()       Returns the current record's "id_descto" value
 * @method string              getCodDescto()      Returns the current record's "cod_descto" value
 * @method string              getDescripcion()    Returns the current record's "descripcion" value
 * @method string              getDescCorta()      Returns the current record's "desc_corta" value
 * @method decimal             getPorcentaje()     Returns the current record's "porcentaje" value
 * @method integer             getIdMaeTer()       Returns the current record's "id_mae_ter" value
 * @method integer             getEstado()         Returns the current record's "estado" value
 * @method integer             getAfectaBase()     Returns the current record's "afecta_base" value
 * @method INTERCEROS          getINTERCEROS()     Returns the current record's "INTERCEROS" value
 * @method Doctrine_Collection getREOBLDETALLE()   Returns the current record's "RE_OBL_DETALLE" collection
 * @method Doctrine_Collection getRELIQDESCTO()    Returns the current record's "RE_LIQ_DESCTO" collection
 * @method RE_DESCUENTOS       setIdDescto()       Sets the current record's "id_descto" value
 * @method RE_DESCUENTOS       setCodDescto()      Sets the current record's "cod_descto" value
 * @method RE_DESCUENTOS       setDescripcion()    Sets the current record's "descripcion" value
 * @method RE_DESCUENTOS       setDescCorta()      Sets the current record's "desc_corta" value
 * @method RE_DESCUENTOS       setPorcentaje()     Sets the current record's "porcentaje" value
 * @method RE_DESCUENTOS       setIdMaeTer()       Sets the current record's "id_mae_ter" value
 * @method RE_DESCUENTOS       setEstado()         Sets the current record's "estado" value
 * @method RE_DESCUENTOS       setAfectaBase()     Sets the current record's "afecta_base" value
 * @method RE_DESCUENTOS       setINTERCEROS()     Sets the current record's "INTERCEROS" value
 * @method RE_DESCUENTOS       setREOBLDETALLE()   Sets the current record's "RE_OBL_DETALLE" collection
 * @method RE_DESCUENTOS       setRELIQDESCTO()    Sets the current record's "RE_LIQ_DESCTO" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRE_DESCUENTOS extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RE_DESCUENTOS');
        $this->hasColumn('id_descto', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('cod_descto', 'string', 4, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 4,
             ));
        $this->hasColumn('descripcion', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('desc_corta', 'string', 10, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 10,
             ));
        $this->hasColumn('porcentaje', 'decimal', 20, array(
             'notnull' => false,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_mae_ter', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('afecta_base', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasMany('RE_OBL_DETALLE', array(
             'local' => 'id_descto',
             'foreign' => 'id_descto'));

        $this->hasMany('RE_LIQ_DESCTO', array(
             'local' => 'id_descto',
             'foreign' => 'id_descto'));
    }
}