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

/**
 * BaseTS_MB
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $descripcion
 * @property integer $rubro_ing
 * @property integer $grupo
 * @property integer $dian
 * @property string $traslado
 * @property string $operador
 * @property integer $id_tip_mov
 * @property string $reintegro
 * @property string $caja
 * @property string $retencion
 * @property integer $id_ts_cr
 * @property integer $caja_men
 * @property TS_CR $TS_CR
 * @property TS_GI $TS_GI
 * @property TS_ID $TS_ID
 * @property Doctrine_Collection $TS_MOV_BANC
 * @property Doctrine_Collection $RE_RECAUDO
 * @property Doctrine_Collection $CM_MOV_BANC
 * @property TS_TIP_MOV $TS_TIP_MOV
 * 
 * @method integer             getId()          Returns the current record's "id" value
 * @method string              getCodigo()      Returns the current record's "codigo" value
 * @method string              getDescripcion() Returns the current record's "descripcion" value
 * @method integer             getRubroIng()    Returns the current record's "rubro_ing" value
 * @method integer             getGrupo()       Returns the current record's "grupo" value
 * @method integer             getDian()        Returns the current record's "dian" value
 * @method string              getTraslado()    Returns the current record's "traslado" value
 * @method string              getOperador()    Returns the current record's "operador" value
 * @method integer             getIdTipMov()    Returns the current record's "id_tip_mov" value
 * @method string              getReintegro()   Returns the current record's "reintegro" value
 * @method string              getCaja()        Returns the current record's "caja" value
 * @method string              getRetencion()   Returns the current record's "retencion" value
 * @method integer             getIdTsCr()      Returns the current record's "id_ts_cr" value
 * @method integer             getCajaMen()     Returns the current record's "caja_men" value
 * @method TS_CR               getTSCR()        Returns the current record's "TS_CR" value
 * @method TS_GI               getTSGI()        Returns the current record's "TS_GI" value
 * @method TS_ID               getTSID()        Returns the current record's "TS_ID" value
 * @method Doctrine_Collection getTSMOVBANC()   Returns the current record's "TS_MOV_BANC" collection
 * @method Doctrine_Collection getRERECAUDO()   Returns the current record's "RE_RECAUDO" collection
 * @method Doctrine_Collection getCMMOVBANC()   Returns the current record's "CM_MOV_BANC" collection
 * @method TS_TIP_MOV          getTSTIPMOV()    Returns the current record's "TS_TIP_MOV" value
 * @method TS_MB               setId()          Sets the current record's "id" value
 * @method TS_MB               setCodigo()      Sets the current record's "codigo" value
 * @method TS_MB               setDescripcion() Sets the current record's "descripcion" value
 * @method TS_MB               setRubroIng()    Sets the current record's "rubro_ing" value
 * @method TS_MB               setGrupo()       Sets the current record's "grupo" value
 * @method TS_MB               setDian()        Sets the current record's "dian" value
 * @method TS_MB               setTraslado()    Sets the current record's "traslado" value
 * @method TS_MB               setOperador()    Sets the current record's "operador" value
 * @method TS_MB               setIdTipMov()    Sets the current record's "id_tip_mov" value
 * @method TS_MB               setReintegro()   Sets the current record's "reintegro" value
 * @method TS_MB               setCaja()        Sets the current record's "caja" value
 * @method TS_MB               setRetencion()   Sets the current record's "retencion" value
 * @method TS_MB               setIdTsCr()      Sets the current record's "id_ts_cr" value
 * @method TS_MB               setCajaMen()     Sets the current record's "caja_men" value
 * @method TS_MB               setTSCR()        Sets the current record's "TS_CR" value
 * @method TS_MB               setTSGI()        Sets the current record's "TS_GI" value
 * @method TS_MB               setTSID()        Sets the current record's "TS_ID" value
 * @method TS_MB               setTSMOVBANC()   Sets the current record's "TS_MOV_BANC" collection
 * @method TS_MB               setRERECAUDO()   Sets the current record's "RE_RECAUDO" collection
 * @method TS_MB               setCMMOVBANC()   Sets the current record's "CM_MOV_BANC" collection
 * @method TS_MB               setTSTIPMOV()    Sets the current record's "TS_TIP_MOV" value
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_MB extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_MB');
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('codigo', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('rubro_ing', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('grupo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('dian', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('traslado', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('operador', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('id_tip_mov', 'integer', 8, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('reintegro', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('caja', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('retencion', 'string', 100, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
        $this->hasColumn('id_ts_cr', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('caja_men', '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_CR', array(
             'local' => 'id_ts_cr',
             'foreign' => 'id'));

        $this->hasOne('TS_GI', array(
             'local' => 'grupo',
             'foreign' => 'id'));

        $this->hasOne('TS_ID', array(
             'local' => 'dian',
             'foreign' => 'id'));

        $this->hasMany('TS_MOV_BANC', array(
             'local' => 'id',
             'foreign' => 'id_ts_mb'));

        $this->hasMany('RE_RECAUDO', array(
             'local' => 'id',
             'foreign' => 'id_ts_mb'));

        $this->hasMany('CM_MOV_BANC', array(
             'local' => 'id',
             'foreign' => 'id_ts_mb'));

        $this->hasOne('TS_TIP_MOV', array(
             'local' => 'id_tip_mov',
             'foreign' => 'id_tip_mov'));
    }
}