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

/**
 * BaseCM_M_CH
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property integer $id_ts_bn
 * @property integer $id_ts_cb
 * @property string $observacion
 * @property string $obs_actualizacion
 * @property integer $id_caja_menor
 * @property TS_BN $TS_BN
 * @property CM_CB $CM_CB
 * @property Doctrine_Collection $CM_CH
 * 
 * @method integer             getId()                Returns the current record's "id" value
 * @method integer             getIdTsBn()            Returns the current record's "id_ts_bn" value
 * @method integer             getIdTsCb()            Returns the current record's "id_ts_cb" value
 * @method string              getObservacion()       Returns the current record's "observacion" value
 * @method string              getObsActualizacion()  Returns the current record's "obs_actualizacion" value
 * @method integer             getIdCajaMenor()       Returns the current record's "id_caja_menor" value
 * @method TS_BN               getTSBN()              Returns the current record's "TS_BN" value
 * @method CM_CB               getCMCB()              Returns the current record's "CM_CB" value
 * @method Doctrine_Collection getCMCH()              Returns the current record's "CM_CH" collection
 * @method CM_M_CH             setId()                Sets the current record's "id" value
 * @method CM_M_CH             setIdTsBn()            Sets the current record's "id_ts_bn" value
 * @method CM_M_CH             setIdTsCb()            Sets the current record's "id_ts_cb" value
 * @method CM_M_CH             setObservacion()       Sets the current record's "observacion" value
 * @method CM_M_CH             setObsActualizacion()  Sets the current record's "obs_actualizacion" value
 * @method CM_M_CH             setIdCajaMenor()       Sets the current record's "id_caja_menor" value
 * @method CM_M_CH             setTSBN()              Sets the current record's "TS_BN" value
 * @method CM_M_CH             setCMCB()              Sets the current record's "CM_CB" value
 * @method CM_M_CH             setCMCH()              Sets the current record's "CM_CH" collection
 * 
 * @package    cobro_coactivo
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseCM_M_CH extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('CM_M_CH');
        $this->hasColumn('id', '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_ts_cb', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('observacion', 'string', 600, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 600,
             ));
        $this->hasColumn('obs_actualizacion', 'string', 600, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 600,
             ));
        $this->hasColumn('id_caja_menor', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
    }

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

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

        $this->hasMany('CM_CH', array(
             'local' => 'id',
             'foreign' => 'id_m_ch'));
    }
}