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

/**
 * BaseRE_DISTRIBUCION
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_distribucion
 * @property string $id_lote
 * @property integer $id_tipo_con
 * @property integer $id_periodo
 * @property integer $id_anhos
 * @property integer $id_mineral
 * @property integer $id_bn
 * @property integer $id_cb
 * @property timestamp $fecha_crea
 * @property string $concepto
 * @property string $produccion
 * @property string $precio
 * @property string $distribucion
 * @property integer $estado
 * @property timestamp $fecha_anu
 * @property string $motivo_anu
 * @property string $porcentaje
 * @property decimal $valor
 * @property decimal $distribuido
 * @property integer $en_uso
 * @property integer $es_transfer
 * @property string $placa_rmn
 * @property string $titular
 * @property integer $id_transfer
 * @property integer $id_ter_genero
 * @property integer $id_ter_elaboro
 * @property RE_LOTE $RE_LOTE
 * @property RE_MINERAL $RE_MINERAL
 * @property RE_PERIODO $RE_PERIODO
 * @property RE_T_CONTRAPRESTACION $RE_T_CONTRAPRESTACION
 * @property TS_BN $TS_BN
 * @property TS_CB $TS_CB
 * @property Doctrine_Collection $RE_OBLIGACION
 * 
 * @method integer               getIdDistribucion()        Returns the current record's "id_distribucion" value
 * @method string                getIdLote()                Returns the current record's "id_lote" value
 * @method integer               getIdTipoCon()             Returns the current record's "id_tipo_con" value
 * @method integer               getIdPeriodo()             Returns the current record's "id_periodo" value
 * @method integer               getIdAnhos()               Returns the current record's "id_anhos" value
 * @method integer               getIdMineral()             Returns the current record's "id_mineral" value
 * @method integer               getIdBn()                  Returns the current record's "id_bn" value
 * @method integer               getIdCb()                  Returns the current record's "id_cb" value
 * @method timestamp             getFechaCrea()             Returns the current record's "fecha_crea" value
 * @method string                getConcepto()              Returns the current record's "concepto" value
 * @method string                getProduccion()            Returns the current record's "produccion" value
 * @method string                getPrecio()                Returns the current record's "precio" value
 * @method string                getDistribucion()          Returns the current record's "distribucion" value
 * @method integer               getEstado()                Returns the current record's "estado" value
 * @method timestamp             getFechaAnu()              Returns the current record's "fecha_anu" value
 * @method string                getMotivoAnu()             Returns the current record's "motivo_anu" value
 * @method string                getPorcentaje()            Returns the current record's "porcentaje" value
 * @method decimal               getValor()                 Returns the current record's "valor" value
 * @method decimal               getDistribuido()           Returns the current record's "distribuido" value
 * @method integer               getEnUso()                 Returns the current record's "en_uso" value
 * @method integer               getEsTransfer()            Returns the current record's "es_transfer" value
 * @method string                getPlacaRmn()              Returns the current record's "placa_rmn" value
 * @method string                getTitular()               Returns the current record's "titular" value
 * @method integer               getIdTransfer()            Returns the current record's "id_transfer" value
 * @method integer               getIdTerGenero()           Returns the current record's "id_ter_genero" value
 * @method integer               getIdTerElaboro()          Returns the current record's "id_ter_elaboro" value
 * @method RE_LOTE               getRELOTE()                Returns the current record's "RE_LOTE" value
 * @method RE_MINERAL            getREMINERAL()             Returns the current record's "RE_MINERAL" value
 * @method RE_PERIODO            getREPERIODO()             Returns the current record's "RE_PERIODO" value
 * @method RE_T_CONTRAPRESTACION getRETCONTRAPRESTACION()   Returns the current record's "RE_T_CONTRAPRESTACION" value
 * @method TS_BN                 getTSBN()                  Returns the current record's "TS_BN" value
 * @method TS_CB                 getTSCB()                  Returns the current record's "TS_CB" value
 * @method Doctrine_Collection   getREOBLIGACION()          Returns the current record's "RE_OBLIGACION" collection
 * @method RE_DISTRIBUCION       setIdDistribucion()        Sets the current record's "id_distribucion" value
 * @method RE_DISTRIBUCION       setIdLote()                Sets the current record's "id_lote" value
 * @method RE_DISTRIBUCION       setIdTipoCon()             Sets the current record's "id_tipo_con" value
 * @method RE_DISTRIBUCION       setIdPeriodo()             Sets the current record's "id_periodo" value
 * @method RE_DISTRIBUCION       setIdAnhos()               Sets the current record's "id_anhos" value
 * @method RE_DISTRIBUCION       setIdMineral()             Sets the current record's "id_mineral" value
 * @method RE_DISTRIBUCION       setIdBn()                  Sets the current record's "id_bn" value
 * @method RE_DISTRIBUCION       setIdCb()                  Sets the current record's "id_cb" value
 * @method RE_DISTRIBUCION       setFechaCrea()             Sets the current record's "fecha_crea" value
 * @method RE_DISTRIBUCION       setConcepto()              Sets the current record's "concepto" value
 * @method RE_DISTRIBUCION       setProduccion()            Sets the current record's "produccion" value
 * @method RE_DISTRIBUCION       setPrecio()                Sets the current record's "precio" value
 * @method RE_DISTRIBUCION       setDistribucion()          Sets the current record's "distribucion" value
 * @method RE_DISTRIBUCION       setEstado()                Sets the current record's "estado" value
 * @method RE_DISTRIBUCION       setFechaAnu()              Sets the current record's "fecha_anu" value
 * @method RE_DISTRIBUCION       setMotivoAnu()             Sets the current record's "motivo_anu" value
 * @method RE_DISTRIBUCION       setPorcentaje()            Sets the current record's "porcentaje" value
 * @method RE_DISTRIBUCION       setValor()                 Sets the current record's "valor" value
 * @method RE_DISTRIBUCION       setDistribuido()           Sets the current record's "distribuido" value
 * @method RE_DISTRIBUCION       setEnUso()                 Sets the current record's "en_uso" value
 * @method RE_DISTRIBUCION       setEsTransfer()            Sets the current record's "es_transfer" value
 * @method RE_DISTRIBUCION       setPlacaRmn()              Sets the current record's "placa_rmn" value
 * @method RE_DISTRIBUCION       setTitular()               Sets the current record's "titular" value
 * @method RE_DISTRIBUCION       setIdTransfer()            Sets the current record's "id_transfer" value
 * @method RE_DISTRIBUCION       setIdTerGenero()           Sets the current record's "id_ter_genero" value
 * @method RE_DISTRIBUCION       setIdTerElaboro()          Sets the current record's "id_ter_elaboro" value
 * @method RE_DISTRIBUCION       setRELOTE()                Sets the current record's "RE_LOTE" value
 * @method RE_DISTRIBUCION       setREMINERAL()             Sets the current record's "RE_MINERAL" value
 * @method RE_DISTRIBUCION       setREPERIODO()             Sets the current record's "RE_PERIODO" value
 * @method RE_DISTRIBUCION       setRETCONTRAPRESTACION()   Sets the current record's "RE_T_CONTRAPRESTACION" value
 * @method RE_DISTRIBUCION       setTSBN()                  Sets the current record's "TS_BN" value
 * @method RE_DISTRIBUCION       setTSCB()                  Sets the current record's "TS_CB" value
 * @method RE_DISTRIBUCION       setREOBLIGACION()          Sets the current record's "RE_OBLIGACION" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseRE_DISTRIBUCION extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RE_DISTRIBUCION');
        $this->hasColumn('id_distribucion', 'integer', 8, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 8,
             ));
        $this->hasColumn('id_lote', 'string', 9, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 9,
             ));
        $this->hasColumn('id_tipo_con', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_periodo', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_anhos', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_mineral', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_bn', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_cb', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_crea', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('concepto', 'string', 512, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 512,
             ));
        $this->hasColumn('produccion', 'string', 45, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 45,
             ));
        $this->hasColumn('precio', 'string', 45, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 45,
             ));
        $this->hasColumn('distribucion', 'string', 45, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 45,
             ));
        $this->hasColumn('estado', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '1',
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('fecha_anu', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('motivo_anu', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'default' => 'NULL',
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('porcentaje', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('valor', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('distribuido', 'decimal', 18, array(
             'notnull' => true,
             'type' => 'decimal',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0',
             'primary' => false,
             'length' => 18,
             ));
        $this->hasColumn('en_uso', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('es_transfer', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('placa_rmn', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('titular', 'string', 128, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('id_transfer', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_ter_genero', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             'default' => 'NULL ',
             ));
        $this->hasColumn('id_ter_elaboro', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasOne('RE_MINERAL', array(
             'local' => 'id_mineral',
             'foreign' => 'id_mineral'));

        $this->hasOne('RE_PERIODO', array(
             'local' => 'id_periodo',
             'foreign' => 'id_periodo'));

        $this->hasOne('RE_T_CONTRAPRESTACION', array(
             'local' => 'id_tipo_con',
             'foreign' => 'id_tipo_con'));

        $this->hasOne('TS_BN', array(
             'local' => 'id_bn',
             'foreign' => 'id_bn'));

        $this->hasOne('TS_CB', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));

        $this->hasMany('RE_OBLIGACION', array(
             'local' => 'id_distribucion',
             'foreign' => 'id_distribucion'));
    }
}