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

/**
 * BaseTS_CR
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $descripcion
 * @property integer $id_ts_ti
 * @property TS_TI $TS_TI
 * @property Doctrine_Collection $TS_IM
 * @property Doctrine_Collection $TS_MB
 * @property Doctrine_Collection $TS_PC_MRC
 * 
 * @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 integer             getIdTsTi()      Returns the current record's "id_ts_ti" value
 * @method TS_TI               getTSTI()        Returns the current record's "TS_TI" value
 * @method Doctrine_Collection getTSIM()        Returns the current record's "TS_IM" collection
 * @method Doctrine_Collection getTSMB()        Returns the current record's "TS_MB" collection
 * @method Doctrine_Collection getTSPCMRC()     Returns the current record's "TS_PC_MRC" collection
 * @method TS_CR               setId()          Sets the current record's "id" value
 * @method TS_CR               setCodigo()      Sets the current record's "codigo" value
 * @method TS_CR               setDescripcion() Sets the current record's "descripcion" value
 * @method TS_CR               setIdTsTi()      Sets the current record's "id_ts_ti" value
 * @method TS_CR               setTSTI()        Sets the current record's "TS_TI" value
 * @method TS_CR               setTSIM()        Sets the current record's "TS_IM" collection
 * @method TS_CR               setTSMB()        Sets the current record's "TS_MB" collection
 * @method TS_CR               setTSPCMRC()     Sets the current record's "TS_PC_MRC" collection
 * 
 * @package    cartera
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_CR extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_CR');
        $this->hasColumn('id', 'integer', 20, array(
             '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('id_ts_ti', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
    }

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

        $this->hasMany('TS_IM', array(
             'local' => 'id',
             'foreign' => 'id_ts_cr'));

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

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