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

/**
 * BaseTS_RC
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_rc
 * @property integer $numero
 * @property timestamp $fecha
 * @property integer $id_tercero
 * @property integer $id_ts_mr
 * @property string $concepto
 * @property integer $id_ts_fp
 * @property string $rec_adicional
 * @property integer $total
 * @property timestamp $fechalog
 * @property string $usuariolog
 * @property string $spresupuestal
 * @property integer $id_ciudad
 * @property integer $estado
 * @property CIUDAD $CIUDAD
 * @property INTERCEROS $INTERCEROS
 * @property TS_PC_FP $TS_PC_FP
 * @property TS_PC_MRC $TS_PC_MRC
 * @property Doctrine_Collection $TS_RC_VRC
 * @property Doctrine_Collection $TS_RC_DEDUCCIONES
 * @property Doctrine_Collection $TS_RC_CH
 * @property Doctrine_Collection $TS_FORMA_PAGO
 * @property Doctrine_Collection $TS_ANUL_RC
 * 
 * @method integer             getIdRc()              Returns the current record's "id_rc" value
 * @method integer             getNumero()            Returns the current record's "numero" value
 * @method timestamp           getFecha()             Returns the current record's "fecha" value
 * @method integer             getIdTercero()         Returns the current record's "id_tercero" value
 * @method integer             getIdTsMr()            Returns the current record's "id_ts_mr" value
 * @method string              getConcepto()          Returns the current record's "concepto" value
 * @method integer             getIdTsFp()            Returns the current record's "id_ts_fp" value
 * @method string              getRecAdicional()      Returns the current record's "rec_adicional" value
 * @method integer             getTotal()             Returns the current record's "total" value
 * @method timestamp           getFechalog()          Returns the current record's "fechalog" value
 * @method string              getUsuariolog()        Returns the current record's "usuariolog" value
 * @method string              getSpresupuestal()     Returns the current record's "spresupuestal" value
 * @method integer             getIdCiudad()          Returns the current record's "id_ciudad" value
 * @method integer             getEstado()            Returns the current record's "estado" value
 * @method CIUDAD              getCIUDAD()            Returns the current record's "CIUDAD" value
 * @method INTERCEROS          getINTERCEROS()        Returns the current record's "INTERCEROS" value
 * @method TS_PC_FP            getTSPCFP()            Returns the current record's "TS_PC_FP" value
 * @method TS_PC_MRC           getTSPCMRC()           Returns the current record's "TS_PC_MRC" value
 * @method Doctrine_Collection getTSRCVRC()           Returns the current record's "TS_RC_VRC" collection
 * @method Doctrine_Collection getTSRCDEDUCCIONES()   Returns the current record's "TS_RC_DEDUCCIONES" collection
 * @method Doctrine_Collection getTSRCCH()            Returns the current record's "TS_RC_CH" collection
 * @method Doctrine_Collection getTSFORMAPAGO()       Returns the current record's "TS_FORMA_PAGO" collection
 * @method Doctrine_Collection getTSANULRC()          Returns the current record's "TS_ANUL_RC" collection
 * @method TS_RC               setIdRc()              Sets the current record's "id_rc" value
 * @method TS_RC               setNumero()            Sets the current record's "numero" value
 * @method TS_RC               setFecha()             Sets the current record's "fecha" value
 * @method TS_RC               setIdTercero()         Sets the current record's "id_tercero" value
 * @method TS_RC               setIdTsMr()            Sets the current record's "id_ts_mr" value
 * @method TS_RC               setConcepto()          Sets the current record's "concepto" value
 * @method TS_RC               setIdTsFp()            Sets the current record's "id_ts_fp" value
 * @method TS_RC               setRecAdicional()      Sets the current record's "rec_adicional" value
 * @method TS_RC               setTotal()             Sets the current record's "total" value
 * @method TS_RC               setFechalog()          Sets the current record's "fechalog" value
 * @method TS_RC               setUsuariolog()        Sets the current record's "usuariolog" value
 * @method TS_RC               setSpresupuestal()     Sets the current record's "spresupuestal" value
 * @method TS_RC               setIdCiudad()          Sets the current record's "id_ciudad" value
 * @method TS_RC               setEstado()            Sets the current record's "estado" value
 * @method TS_RC               setCIUDAD()            Sets the current record's "CIUDAD" value
 * @method TS_RC               setINTERCEROS()        Sets the current record's "INTERCEROS" value
 * @method TS_RC               setTSPCFP()            Sets the current record's "TS_PC_FP" value
 * @method TS_RC               setTSPCMRC()           Sets the current record's "TS_PC_MRC" value
 * @method TS_RC               setTSRCVRC()           Sets the current record's "TS_RC_VRC" collection
 * @method TS_RC               setTSRCDEDUCCIONES()   Sets the current record's "TS_RC_DEDUCCIONES" collection
 * @method TS_RC               setTSRCCH()            Sets the current record's "TS_RC_CH" collection
 * @method TS_RC               setTSFORMAPAGO()       Sets the current record's "TS_FORMA_PAGO" collection
 * @method TS_RC               setTSANULRC()          Sets the current record's "TS_ANUL_RC" collection
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_RC extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_RC');
        $this->hasColumn('id_rc', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('numero', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fecha', 'timestamp', 7, array(
             'notnull' => true,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('id_tercero', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_ts_mr', 'integer', 20, array(
             'notnull' => true,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('concepto', 'string', 500, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 500,
             ));
        $this->hasColumn('id_ts_fp', 'integer', 8, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 8,
             ));
        $this->hasColumn('rec_adicional', 'string', 160, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 160,
             ));
        $this->hasColumn('total', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('fechalog', 'timestamp', 7, array(
             'notnull' => false,
             'type' => 'timestamp',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 7,
             ));
        $this->hasColumn('usuariolog', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('spresupuestal', 'string', 1, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('id_ciudad', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('estado', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasOne('INTERCEROS', array(
             'local' => 'id_tercero',
             'foreign' => 'id_mae_ter'));

        $this->hasOne('TS_PC_FP', array(
             'local' => 'id_ts_fp',
             'foreign' => 'id'));

        $this->hasOne('TS_PC_MRC', array(
             'local' => 'id_ts_mr',
             'foreign' => 'id'));

        $this->hasMany('TS_RC_VRC', array(
             'local' => 'id_rc',
             'foreign' => 'id_rc'));

        $this->hasMany('TS_RC_DEDUCCIONES', array(
             'local' => 'id_rc',
             'foreign' => 'id_rc'));

        $this->hasMany('TS_RC_CH', array(
             'local' => 'id_rc',
             'foreign' => 'id_rc'));

        $this->hasMany('TS_FORMA_PAGO', array(
             'local' => 'id_rc',
             'foreign' => 'id_rc'));

        $this->hasMany('TS_ANUL_RC', array(
             'local' => 'id_rc',
             'foreign' => 'id_rc'));
    }
}