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

/**
 * BaseTS_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 TS_BN $TS_BN
 * @property TS_CB $TS_CB
 * @property Doctrine_Collection $TS_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 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 getTSCH()              Returns the current record's "TS_CH" collection
 * @method TS_M_CH             setId()                Sets the current record's "id" value
 * @method TS_M_CH             setIdTsBn()            Sets the current record's "id_ts_bn" value
 * @method TS_M_CH             setIdTsCb()            Sets the current record's "id_ts_cb" value
 * @method TS_M_CH             setObservacion()       Sets the current record's "observacion" value
 * @method TS_M_CH             setObsActualizacion()  Sets the current record's "obs_actualizacion" value
 * @method TS_M_CH             setTSBN()              Sets the current record's "TS_BN" value
 * @method TS_M_CH             setTSCB()              Sets the current record's "TS_CB" value
 * @method TS_M_CH             setTSCH()              Sets the current record's "TS_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 BaseTS_M_CH extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_M_CH');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             '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,
             ));
    }

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

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

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