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

/**
 * BaseCM_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 integer $id_caja_menor
 * @property CIUDAD $CIUDAD
 * @property CM_CAJA_MENOR $CM_CAJA_MENOR
 * @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 $CM_SALDO_BANC
 * @property Doctrine_Collection $CM_M_CH
 * @property Doctrine_Collection $CM_MOV_BANC
 * @property Doctrine_Collection $CM_EMISION_PAGO
 * 
 * @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 integer             getIdCajaMenor()     Returns the current record's "id_caja_menor" value
 * @method CIUDAD              getCIUDAD()          Returns the current record's "CIUDAD" value
 * @method CM_CAJA_MENOR       getCMCAJAMENOR()     Returns the current record's "CM_CAJA_MENOR" 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 getCMSALDOBANC()     Returns the current record's "CM_SALDO_BANC" collection
 * @method Doctrine_Collection getCMMCH()           Returns the current record's "CM_M_CH" collection
 * @method Doctrine_Collection getCMMOVBANC()       Returns the current record's "CM_MOV_BANC" collection
 * @method Doctrine_Collection getCMEMISIONPAGO()   Returns the current record's "CM_EMISION_PAGO" collection
 * @method CM_CB               setIdCb()            Sets the current record's "id_cb" value
 * @method CM_CB               setIdTsBn()          Sets the current record's "id_ts_bn" value
 * @method CM_CB               setIdTc()            Sets the current record's "id_tc" value
 * @method CM_CB               setNumeroCuenta()    Sets the current record's "numero_cuenta" value
 * @method CM_CB               setCodigoSuc()       Sets the current record's "codigo_suc" value
 * @method CM_CB               setIdCiudad()        Sets the current record's "id_ciudad" value
 * @method CM_CB               setIdRegional()      Sets the current record's "id_regional" value
 * @method CM_CB               setUtilizacionCta()  Sets the current record's "utilizacion_cta" value
 * @method CM_CB               setFechaApertura()   Sets the current record's "fecha_apertura" value
 * @method CM_CB               setEstadoCuenta()    Sets the current record's "estado_cuenta" value
 * @method CM_CB               setIdFormatoChq()    Sets the current record's "id_formato_chq" value
 * @method CM_CB               setConsecutivoCh()   Sets the current record's "consecutivo_ch" value
 * @method CM_CB               setCupoSobregiro()   Sets the current record's "cupo_sobregiro" value
 * @method CM_CB               setAporte()          Sets the current record's "aporte" value
 * @method CM_CB               setManejoRecurs()    Sets the current record's "manejo_recurs" value
 * @method CM_CB               setIdCajaMenor()     Sets the current record's "id_caja_menor" value
 * @method CM_CB               setCIUDAD()          Sets the current record's "CIUDAD" value
 * @method CM_CB               setCMCAJAMENOR()     Sets the current record's "CM_CAJA_MENOR" value
 * @method CM_CB               setTSBN()            Sets the current record's "TS_BN" value
 * @method CM_CB               setTSFC()            Sets the current record's "TS_FC" value
 * @method CM_CB               setTSMR()            Sets the current record's "TS_MR" value
 * @method CM_CB               setTSRG()            Sets the current record's "TS_RG" value
 * @method CM_CB               setTSTC()            Sets the current record's "TS_TC" value
 * @method CM_CB               setCMSALDOBANC()     Sets the current record's "CM_SALDO_BANC" collection
 * @method CM_CB               setCMMCH()           Sets the current record's "CM_M_CH" collection
 * @method CM_CB               setCMMOVBANC()       Sets the current record's "CM_MOV_BANC" collection
 * @method CM_CB               setCMEMISIONPAGO()   Sets the current record's "CM_EMISION_PAGO" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCM_CB extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CM_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,
             ));
        $this->hasColumn('id_caja_menor', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasOne('CM_CAJA_MENOR', array(
             'local' => 'id_caja_menor',
             'foreign' => 'id_caja_menor'));

        $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('CM_SALDO_BANC', array(
             'local' => 'id_cb',
             'foreign' => 'id_ts_cb'));

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

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

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