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

/**
 * BaseTS_ID
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $descripcion
 * @property string $tipo
 * @property Doctrine_Collection $TS_PC_MRC
 * @property Doctrine_Collection $TS_MB
 * @property Doctrine_Collection $TS_CP
 * 
 * @method integer             getId()          Returns the current record's "id" value
 * @method string              getCodigo()      Returns the current record's "codigo" value
 * @method string              getDescripcion() Returns the current record's "descripcion" value
 * @method string              getTipo()        Returns the current record's "tipo" value
 * @method Doctrine_Collection getTSPCMRC()     Returns the current record's "TS_PC_MRC" collection
 * @method Doctrine_Collection getTSMB()        Returns the current record's "TS_MB" collection
 * @method Doctrine_Collection getTSCP()        Returns the current record's "TS_CP" collection
 * @method TS_ID               setId()          Sets the current record's "id" value
 * @method TS_ID               setCodigo()      Sets the current record's "codigo" value
 * @method TS_ID               setDescripcion() Sets the current record's "descripcion" value
 * @method TS_ID               setTipo()        Sets the current record's "tipo" value
 * @method TS_ID               setTSPCMRC()     Sets the current record's "TS_PC_MRC" collection
 * @method TS_ID               setTSMB()        Sets the current record's "TS_MB" collection
 * @method TS_ID               setTSCP()        Sets the current record's "TS_CP" collection
 * 
 * @package    contratacion
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_ID extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_ID');
        $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('descripcion', 'string', 1000, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('tipo', 'string', 1, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasMany('TS_MB', array(
             'local' => 'id',
             'foreign' => 'dian'));

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