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

/**
 * BaseTS_PC_MRC
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $codigo
 * @property string $descripcion
 * @property string $desccorta
 * @property string $retencion
 * @property integer $id_ts_cr
 * @property integer $rubro
 * @property integer $grupo
 * @property integer $dian
 * @property string $reintegro
 * @property TS_CR $TS_CR
 * @property TS_GI $TS_GI
 * @property TS_ID $TS_ID
 * @property Doctrine_Collection $TS_RC
 * @property Doctrine_Collection $TS_PC_VRC
 * 
 * @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              getDesccorta()   Returns the current record's "desccorta" value
 * @method string              getRetencion()   Returns the current record's "retencion" value
 * @method integer             getIdTsCr()      Returns the current record's "id_ts_cr" value
 * @method integer             getRubro()       Returns the current record's "rubro" value
 * @method integer             getGrupo()       Returns the current record's "grupo" value
 * @method integer             getDian()        Returns the current record's "dian" value
 * @method string              getReintegro()   Returns the current record's "reintegro" value
 * @method TS_CR               getTSCR()        Returns the current record's "TS_CR" value
 * @method TS_GI               getTSGI()        Returns the current record's "TS_GI" value
 * @method TS_ID               getTSID()        Returns the current record's "TS_ID" value
 * @method Doctrine_Collection getTSRC()        Returns the current record's "TS_RC" collection
 * @method Doctrine_Collection getTSPCVRC()     Returns the current record's "TS_PC_VRC" collection
 * @method TS_PC_MRC           setId()          Sets the current record's "id" value
 * @method TS_PC_MRC           setCodigo()      Sets the current record's "codigo" value
 * @method TS_PC_MRC           setDescripcion() Sets the current record's "descripcion" value
 * @method TS_PC_MRC           setDesccorta()   Sets the current record's "desccorta" value
 * @method TS_PC_MRC           setRetencion()   Sets the current record's "retencion" value
 * @method TS_PC_MRC           setIdTsCr()      Sets the current record's "id_ts_cr" value
 * @method TS_PC_MRC           setRubro()       Sets the current record's "rubro" value
 * @method TS_PC_MRC           setGrupo()       Sets the current record's "grupo" value
 * @method TS_PC_MRC           setDian()        Sets the current record's "dian" value
 * @method TS_PC_MRC           setReintegro()   Sets the current record's "reintegro" value
 * @method TS_PC_MRC           setTSCR()        Sets the current record's "TS_CR" value
 * @method TS_PC_MRC           setTSGI()        Sets the current record's "TS_GI" value
 * @method TS_PC_MRC           setTSID()        Sets the current record's "TS_ID" value
 * @method TS_PC_MRC           setTSRC()        Sets the current record's "TS_RC" collection
 * @method TS_PC_MRC           setTSPCVRC()     Sets the current record's "TS_PC_VRC" 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_PC_MRC extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_PC_MRC');
        $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' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('descripcion', 'string', 1000, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1000,
             ));
        $this->hasColumn('desccorta', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('retencion', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_ts_cr', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('rubro', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('grupo', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('dian', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('reintegro', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasOne('TS_GI', array(
             'local' => 'grupo',
             'foreign' => 'id'));

        $this->hasOne('TS_ID', array(
             'local' => 'dian',
             'foreign' => 'id'));

        $this->hasMany('TS_RC', array(
             'local' => 'id',
             'foreign' => 'id_ts_mr'));

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