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

/**
 * BaseTS_TD
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id
 * @property string $documento
 * @property string $descripcion
 * @property string $desccorta
 * @property integer $codsiif
 * @property Doctrine_Collection $TS_NOT_TESO
 * @property Doctrine_Collection $TS_MOV_BANC
 * @property Doctrine_Collection $RE_RECAUDO
 * @property Doctrine_Collection $NO_NOV_DED_ADIC
 * @property Doctrine_Collection $NO_NOV_DED_ADIC_8
 * @property Doctrine_Collection $IN_MOVIMIENTOS_DV
 * @property Doctrine_Collection $IN_MOVIMIENTOS_CON
 * @property Doctrine_Collection $CM_MOV_BANC
 * @property Doctrine_Collection $CA_NOVEDAD_CARTERA
 * @property Doctrine_Collection $CA_CREDITO
 * @property Doctrine_Collection $NO_NOV_DED_ADIC_7
 * 
 * @method integer             getId()                 Returns the current record's "id" value
 * @method string              getDocumento()          Returns the current record's "documento" value
 * @method string              getDescripcion()        Returns the current record's "descripcion" value
 * @method string              getDesccorta()          Returns the current record's "desccorta" value
 * @method integer             getCodsiif()            Returns the current record's "codsiif" value
 * @method Doctrine_Collection getTSNOTTESO()          Returns the current record's "TS_NOT_TESO" collection
 * @method Doctrine_Collection getTSMOVBANC()          Returns the current record's "TS_MOV_BANC" collection
 * @method Doctrine_Collection getRERECAUDO()          Returns the current record's "RE_RECAUDO" collection
 * @method Doctrine_Collection getNONOVDEDADIC()       Returns the current record's "NO_NOV_DED_ADIC" collection
 * @method Doctrine_Collection getNONOVDEDADIC8()      Returns the current record's "NO_NOV_DED_ADIC_8" collection
 * @method Doctrine_Collection getINMOVIMIENTOSDV()    Returns the current record's "IN_MOVIMIENTOS_DV" collection
 * @method Doctrine_Collection getINMOVIMIENTOSCON()   Returns the current record's "IN_MOVIMIENTOS_CON" collection
 * @method Doctrine_Collection getCMMOVBANC()          Returns the current record's "CM_MOV_BANC" collection
 * @method Doctrine_Collection getCANOVEDADCARTERA()   Returns the current record's "CA_NOVEDAD_CARTERA" collection
 * @method Doctrine_Collection getCACREDITO()          Returns the current record's "CA_CREDITO" collection
 * @method Doctrine_Collection getNONOVDEDADIC7()      Returns the current record's "NO_NOV_DED_ADIC_7" collection
 * @method TS_TD               setId()                 Sets the current record's "id" value
 * @method TS_TD               setDocumento()          Sets the current record's "documento" value
 * @method TS_TD               setDescripcion()        Sets the current record's "descripcion" value
 * @method TS_TD               setDesccorta()          Sets the current record's "desccorta" value
 * @method TS_TD               setCodsiif()            Sets the current record's "codsiif" value
 * @method TS_TD               setTSNOTTESO()          Sets the current record's "TS_NOT_TESO" collection
 * @method TS_TD               setTSMOVBANC()          Sets the current record's "TS_MOV_BANC" collection
 * @method TS_TD               setRERECAUDO()          Sets the current record's "RE_RECAUDO" collection
 * @method TS_TD               setNONOVDEDADIC()       Sets the current record's "NO_NOV_DED_ADIC" collection
 * @method TS_TD               setNONOVDEDADIC8()      Sets the current record's "NO_NOV_DED_ADIC_8" collection
 * @method TS_TD               setINMOVIMIENTOSDV()    Sets the current record's "IN_MOVIMIENTOS_DV" collection
 * @method TS_TD               setINMOVIMIENTOSCON()   Sets the current record's "IN_MOVIMIENTOS_CON" collection
 * @method TS_TD               setCMMOVBANC()          Sets the current record's "CM_MOV_BANC" collection
 * @method TS_TD               setCANOVEDADCARTERA()   Sets the current record's "CA_NOVEDAD_CARTERA" collection
 * @method TS_TD               setCACREDITO()          Sets the current record's "CA_CREDITO" collection
 * @method TS_TD               setNONOVDEDADIC7()      Sets the current record's "NO_NOV_DED_ADIC_7" 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_TD extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_TD');
        $this->hasColumn('id', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('documento', 'string', 20, array(
             'notnull' => true,
             '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('codsiif', 'integer', 2, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 2,
             ));
    }

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

        $this->hasMany('TS_MOV_BANC', array(
             'local' => 'id',
             'foreign' => 'id_ts_td'));

        $this->hasMany('RE_RECAUDO', array(
             'local' => 'id',
             'foreign' => 'id_ts_td'));

        $this->hasMany('NO_NOV_DED_ADIC', array(
             'local' => 'id',
             'foreign' => 'tipo_doc_sop'));

        $this->hasMany('NO_NOV_DED_ADIC as NO_NOV_DED_ADIC_8', array(
             'local' => 'id',
             'foreign' => 'tipo_doc_cierre'));

        $this->hasMany('IN_MOVIMIENTOS_DV', array(
             'local' => 'id',
             'foreign' => 'id_ts_td'));

        $this->hasMany('IN_MOVIMIENTOS_CON', array(
             'local' => 'id',
             'foreign' => 'id_ts_td'));

        $this->hasMany('CM_MOV_BANC', array(
             'local' => 'id',
             'foreign' => 'id_ts_td'));

        $this->hasMany('CA_NOVEDAD_CARTERA', array(
             'local' => 'id',
             'foreign' => 'id_ts_td'));

        $this->hasMany('CA_CREDITO', array(
             'local' => 'id',
             'foreign' => 'id_ts_td'));

        $this->hasMany('NO_NOV_DED_ADIC as NO_NOV_DED_ADIC_7', array(
             'local' => 'id',
             'foreign' => 'tipo_doc_cierre'));
    }
}