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

/**
 * BaseTS_CB
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_cb
 * @property integer $id_ts_bn
 * @property integer $id_tc
 * @property string $numero_cuenta
 * @property integer $codigo_suc
 * @property integer $id_ciudad
 * @property integer $id_regional
 * @property string $utilizacion_cta
 * @property timestamp $fecha_apertura
 * @property string $estado_cuenta
 * @property integer $id_formato_chq
 * @property integer $consecutivo_ch
 * @property string $cupo_sobregiro
 * @property string $aporte
 * @property integer $manejo_recurs
 * @property CIUDAD $CIUDAD
 * @property TS_BN $TS_BN
 * @property TS_FC $TS_FC
 * @property TS_MR $TS_MR
 * @property TS_RG $TS_RG
 * @property TS_TC $TS_TC
 * @property Doctrine_Collection $CA_FACTURA_PAGO
 * @property Doctrine_Collection $PR_PG
 * @property Doctrine_Collection $TR_DIS_VAL
 * @property Doctrine_Collection $TS_DIS_REG
 * @property Doctrine_Collection $TS_EMISION_PAGO
 * @property Doctrine_Collection $TS_M_CH
 * @property Doctrine_Collection $TS_MOV_BANC
 * @property Doctrine_Collection $TS_SALDO_BANC
 * @property Doctrine_Collection $RE_DISTRIBUCION
 * @property Doctrine_Collection $CA_CREDITO
 * @property Doctrine_Collection $RE_LOTE
 * @property Doctrine_Collection $RE_RECAUDO
 * @property Doctrine_Collection $RE_MINERAL
 * @property Doctrine_Collection $CA_FACTURA_PAGO_TEMP
 * 
 * @method integer             getIdCb()                 Returns the current record's "id_cb" value
 * @method integer             getIdTsBn()               Returns the current record's "id_ts_bn" value
 * @method integer             getIdTc()                 Returns the current record's "id_tc" value
 * @method string              getNumeroCuenta()         Returns the current record's "numero_cuenta" value
 * @method integer             getCodigoSuc()            Returns the current record's "codigo_suc" value
 * @method integer             getIdCiudad()             Returns the current record's "id_ciudad" value
 * @method integer             getIdRegional()           Returns the current record's "id_regional" value
 * @method string              getUtilizacionCta()       Returns the current record's "utilizacion_cta" value
 * @method timestamp           getFechaApertura()        Returns the current record's "fecha_apertura" value
 * @method string              getEstadoCuenta()         Returns the current record's "estado_cuenta" value
 * @method integer             getIdFormatoChq()         Returns the current record's "id_formato_chq" value
 * @method integer             getConsecutivoCh()        Returns the current record's "consecutivo_ch" value
 * @method string              getCupoSobregiro()        Returns the current record's "cupo_sobregiro" value
 * @method string              getAporte()               Returns the current record's "aporte" value
 * @method integer             getManejoRecurs()         Returns the current record's "manejo_recurs" value
 * @method CIUDAD              getCIUDAD()               Returns the current record's "CIUDAD" value
 * @method TS_BN               getTSBN()                 Returns the current record's "TS_BN" value
 * @method TS_FC               getTSFC()                 Returns the current record's "TS_FC" value
 * @method TS_MR               getTSMR()                 Returns the current record's "TS_MR" value
 * @method TS_RG               getTSRG()                 Returns the current record's "TS_RG" value
 * @method TS_TC               getTSTC()                 Returns the current record's "TS_TC" value
 * @method Doctrine_Collection getCAFACTURAPAGO()        Returns the current record's "CA_FACTURA_PAGO" collection
 * @method Doctrine_Collection getPRPG()                 Returns the current record's "PR_PG" collection
 * @method Doctrine_Collection getTRDISVAL()             Returns the current record's "TR_DIS_VAL" collection
 * @method Doctrine_Collection getTSDISREG()             Returns the current record's "TS_DIS_REG" collection
 * @method Doctrine_Collection getTSEMISIONPAGO()        Returns the current record's "TS_EMISION_PAGO" collection
 * @method Doctrine_Collection getTSMCH()                Returns the current record's "TS_M_CH" collection
 * @method Doctrine_Collection getTSMOVBANC()            Returns the current record's "TS_MOV_BANC" collection
 * @method Doctrine_Collection getTSSALDOBANC()          Returns the current record's "TS_SALDO_BANC" collection
 * @method Doctrine_Collection getREDISTRIBUCION()       Returns the current record's "RE_DISTRIBUCION" collection
 * @method Doctrine_Collection getCACREDITO()            Returns the current record's "CA_CREDITO" collection
 * @method Doctrine_Collection getRELOTE()               Returns the current record's "RE_LOTE" collection
 * @method Doctrine_Collection getRERECAUDO()            Returns the current record's "RE_RECAUDO" collection
 * @method Doctrine_Collection getREMINERAL()            Returns the current record's "RE_MINERAL" collection
 * @method Doctrine_Collection getCAFACTURAPAGOTEMP()    Returns the current record's "CA_FACTURA_PAGO_TEMP" collection
 * @method TS_CB               setIdCb()                 Sets the current record's "id_cb" value
 * @method TS_CB               setIdTsBn()               Sets the current record's "id_ts_bn" value
 * @method TS_CB               setIdTc()                 Sets the current record's "id_tc" value
 * @method TS_CB               setNumeroCuenta()         Sets the current record's "numero_cuenta" value
 * @method TS_CB               setCodigoSuc()            Sets the current record's "codigo_suc" value
 * @method TS_CB               setIdCiudad()             Sets the current record's "id_ciudad" value
 * @method TS_CB               setIdRegional()           Sets the current record's "id_regional" value
 * @method TS_CB               setUtilizacionCta()       Sets the current record's "utilizacion_cta" value
 * @method TS_CB               setFechaApertura()        Sets the current record's "fecha_apertura" value
 * @method TS_CB               setEstadoCuenta()         Sets the current record's "estado_cuenta" value
 * @method TS_CB               setIdFormatoChq()         Sets the current record's "id_formato_chq" value
 * @method TS_CB               setConsecutivoCh()        Sets the current record's "consecutivo_ch" value
 * @method TS_CB               setCupoSobregiro()        Sets the current record's "cupo_sobregiro" value
 * @method TS_CB               setAporte()               Sets the current record's "aporte" value
 * @method TS_CB               setManejoRecurs()         Sets the current record's "manejo_recurs" value
 * @method TS_CB               setCIUDAD()               Sets the current record's "CIUDAD" value
 * @method TS_CB               setTSBN()                 Sets the current record's "TS_BN" value
 * @method TS_CB               setTSFC()                 Sets the current record's "TS_FC" value
 * @method TS_CB               setTSMR()                 Sets the current record's "TS_MR" value
 * @method TS_CB               setTSRG()                 Sets the current record's "TS_RG" value
 * @method TS_CB               setTSTC()                 Sets the current record's "TS_TC" value
 * @method TS_CB               setCAFACTURAPAGO()        Sets the current record's "CA_FACTURA_PAGO" collection
 * @method TS_CB               setPRPG()                 Sets the current record's "PR_PG" collection
 * @method TS_CB               setTRDISVAL()             Sets the current record's "TR_DIS_VAL" collection
 * @method TS_CB               setTSDISREG()             Sets the current record's "TS_DIS_REG" collection
 * @method TS_CB               setTSEMISIONPAGO()        Sets the current record's "TS_EMISION_PAGO" collection
 * @method TS_CB               setTSMCH()                Sets the current record's "TS_M_CH" collection
 * @method TS_CB               setTSMOVBANC()            Sets the current record's "TS_MOV_BANC" collection
 * @method TS_CB               setTSSALDOBANC()          Sets the current record's "TS_SALDO_BANC" collection
 * @method TS_CB               setREDISTRIBUCION()       Sets the current record's "RE_DISTRIBUCION" collection
 * @method TS_CB               setCACREDITO()            Sets the current record's "CA_CREDITO" collection
 * @method TS_CB               setRELOTE()               Sets the current record's "RE_LOTE" collection
 * @method TS_CB               setRERECAUDO()            Sets the current record's "RE_RECAUDO" collection
 * @method TS_CB               setREMINERAL()            Sets the current record's "RE_MINERAL" collection
 * @method TS_CB               setCAFACTURAPAGOTEMP()    Sets the current record's "CA_FACTURA_PAGO_TEMP" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_CB extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_CB');
        $this->hasColumn('id_cb', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('id_ts_bn', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_tc', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('numero_cuenta', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('codigo_suc', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_ciudad', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_regional', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('utilizacion_cta', 'string', 1000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('fecha_apertura', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('estado_cuenta', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 1,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_formato_chq', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('consecutivo_ch', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('cupo_sobregiro', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('aporte', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('manejo_recurs', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

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

        $this->hasOne('TS_FC', array(
             'local' => 'id_formato_chq',
             'foreign' => 'id'));

        $this->hasOne('TS_MR', array(
             'local' => 'manejo_recurs',
             'foreign' => 'id'));

        $this->hasOne('TS_RG', array(
             'local' => 'id_regional',
             'foreign' => 'id'));

        $this->hasOne('TS_TC', array(
             'local' => 'id_tc',
             'foreign' => 'id'));

        $this->hasMany('CA_FACTURA_PAGO', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));

        $this->hasMany('PR_PG', array(
             'local' => 'id_cb',
             'foreign' => 'id_ts_cb'));

        $this->hasMany('TR_DIS_VAL', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));

        $this->hasMany('TS_DIS_REG', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));

        $this->hasMany('TS_EMISION_PAGO', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));

        $this->hasMany('TS_M_CH', array(
             'local' => 'id_cb',
             'foreign' => 'id_ts_cb'));

        $this->hasMany('TS_MOV_BANC', array(
             'local' => 'id_cb',
             'foreign' => 'id_ts_cb'));

        $this->hasMany('TS_SALDO_BANC', array(
             'local' => 'id_cb',
             'foreign' => 'id_ts_cb'));

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

        $this->hasMany('CA_CREDITO', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));

        $this->hasMany('RE_LOTE', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));

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

        $this->hasMany('RE_MINERAL', array(
             'local' => 'id_cb',
             'foreign' => 'id_ts_cb'));

        $this->hasMany('CA_FACTURA_PAGO_TEMP', array(
             'local' => 'id_cb',
             'foreign' => 'id_cb'));
    }
}