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

/**
 * BaseRE_LOTE
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property string $id_lote
 * @property timestamp $fecha_crea
 * @property string $descripcion
 * @property integer $estado
 * @property timestamp $fecha_anu
 * @property string $motivo_anu
 * @property integer $id_bn
 * @property integer $id_cb
 * @property integer $en_uso
 * @property TS_BN $TS_BN
 * @property TS_CB $TS_CB
 * @property Doctrine_Collection $RE_LOTE_RECAUDO
 * @property Doctrine_Collection $RE_DISTRIBUCION
 * 
 * @method string              getIdLote()          Returns the current record's "id_lote" value
 * @method timestamp           getFechaCrea()       Returns the current record's "fecha_crea" value
 * @method string              getDescripcion()     Returns the current record's "descripcion" 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 integer             getIdBn()            Returns the current record's "id_bn" value
 * @method integer             getIdCb()            Returns the current record's "id_cb" value
 * @method integer             getEnUso()           Returns the current record's "en_uso" 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 getRELOTERECAUDO()   Returns the current record's "RE_LOTE_RECAUDO" collection
 * @method Doctrine_Collection getREDISTRIBUCION()  Returns the current record's "RE_DISTRIBUCION" collection
 * @method RE_LOTE             setIdLote()          Sets the current record's "id_lote" value
 * @method RE_LOTE             setFechaCrea()       Sets the current record's "fecha_crea" value
 * @method RE_LOTE             setDescripcion()     Sets the current record's "descripcion" value
 * @method RE_LOTE             setEstado()          Sets the current record's "estado" value
 * @method RE_LOTE             setFechaAnu()        Sets the current record's "fecha_anu" value
 * @method RE_LOTE             setMotivoAnu()       Sets the current record's "motivo_anu" value
 * @method RE_LOTE             setIdBn()            Sets the current record's "id_bn" value
 * @method RE_LOTE             setIdCb()            Sets the current record's "id_cb" value
 * @method RE_LOTE             setEnUso()           Sets the current record's "en_uso" value
 * @method RE_LOTE             setTSBN()            Sets the current record's "TS_BN" value
 * @method RE_LOTE             setTSCB()            Sets the current record's "TS_CB" value
 * @method RE_LOTE             setRELOTERECAUDO()   Sets the current record's "RE_LOTE_RECAUDO" collection
 * @method RE_LOTE             setREDISTRIBUCION()  Sets the current record's "RE_DISTRIBUCION" 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_LOTE extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('RE_LOTE');
        $this->hasColumn('id_lote', 'string', 9, array(
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 9,
             ));
        $this->hasColumn('fecha_crea', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('descripcion', 'string', 128, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 128,
             ));
        $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,
             'primary' => false,
             'length' => 128,
             ));
        $this->hasColumn('id_bn', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('id_cb', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('en_uso', 'integer', 1, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 1,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $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_LOTE_RECAUDO', array(
             'local' => 'id_lote',
             'foreign' => 'id_lote'));

        $this->hasMany('RE_DISTRIBUCION', array(
             'local' => 'id_lote',
             'foreign' => 'id_lote'));
    }
}