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

/**
 * BaseTS_RG
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $nombre
 * @property Doctrine_Collection $TS_CB
 * @property Doctrine_Collection $CM_CB
 * 
 * @method integer             getId()     Returns the current record's "id" value
 * @method string              getCodigo() Returns the current record's "codigo" value
 * @method string              getNombre() Returns the current record's "nombre" value
 * @method Doctrine_Collection getTSCB()   Returns the current record's "TS_CB" collection
 * @method Doctrine_Collection getCMCB()   Returns the current record's "CM_CB" collection
 * @method TS_RG               setId()     Sets the current record's "id" value
 * @method TS_RG               setCodigo() Sets the current record's "codigo" value
 * @method TS_RG               setNombre() Sets the current record's "nombre" value
 * @method TS_RG               setTSCB()   Sets the current record's "TS_CB" collection
 * @method TS_RG               setCMCB()   Sets the current record's "CM_CB" collection
 * 
 * @package    controlComisiones
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_RG extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_RG');
        $this->hasColumn('id', 'integer', 20, array(
             'notnull' => false,
             '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('nombre', 'string', 100, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 100,
             ));
    }

    public function setUp()
    {
        parent::setUp();
        $this->hasMany('TS_CB', array(
             'local' => 'id',
             'foreign' => 'id_regional'));

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