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

/**
 * BaseTS_CP
 * 
 * This class has been auto-generated by the Doctrine ORM Framework
 * 
 * @property integer $id_cp
 * @property string $clase_cuenta
 * @property string $descripcion
 * @property string $abreviacion
 * @property integer $id_im_retefuente
 * @property integer $id_im_reteiva
 * @property integer $id_im_reteica
 * @property integer $dian
 * @property integer $iva_teorico
 * @property string $codsiif
 * @property integer $caja_menor
 * @property integer $id_obj_gasto
 * @property string $expsiif
 * @property string $tiposiif
 * @property integer $reporta_distritales
 * @property TS_ID $TS_ID
 * @property TS_IM $TS_IM
 * @property TS_IM $TS_IM_3
 * @property TS_IM $TS_IM_4
 * @property TS_IM $TS_IM_2
 * 
 * @method integer getIdCp()                Returns the current record's "id_cp" value
 * @method string  getClaseCuenta()         Returns the current record's "clase_cuenta" value
 * @method string  getDescripcion()         Returns the current record's "descripcion" value
 * @method string  getAbreviacion()         Returns the current record's "abreviacion" value
 * @method integer getIdImRetefuente()      Returns the current record's "id_im_retefuente" value
 * @method integer getIdImReteiva()         Returns the current record's "id_im_reteiva" value
 * @method integer getIdImReteica()         Returns the current record's "id_im_reteica" value
 * @method integer getDian()                Returns the current record's "dian" value
 * @method integer getIvaTeorico()          Returns the current record's "iva_teorico" value
 * @method string  getCodsiif()             Returns the current record's "codsiif" value
 * @method integer getCajaMenor()           Returns the current record's "caja_menor" value
 * @method integer getIdObjGasto()          Returns the current record's "id_obj_gasto" value
 * @method string  getExpsiif()             Returns the current record's "expsiif" value
 * @method string  getTiposiif()            Returns the current record's "tiposiif" value
 * @method integer getReportaDistritales()  Returns the current record's "reporta_distritales" value
 * @method TS_ID   getTSID()                Returns the current record's "TS_ID" value
 * @method TS_IM   getTSIM()                Returns the current record's "TS_IM" value
 * @method TS_IM   getTSIM3()               Returns the current record's "TS_IM_3" value
 * @method TS_IM   getTSIM4()               Returns the current record's "TS_IM_4" value
 * @method TS_IM   getTSIM2()               Returns the current record's "TS_IM_2" value
 * @method TS_CP   setIdCp()                Sets the current record's "id_cp" value
 * @method TS_CP   setClaseCuenta()         Sets the current record's "clase_cuenta" value
 * @method TS_CP   setDescripcion()         Sets the current record's "descripcion" value
 * @method TS_CP   setAbreviacion()         Sets the current record's "abreviacion" value
 * @method TS_CP   setIdImRetefuente()      Sets the current record's "id_im_retefuente" value
 * @method TS_CP   setIdImReteiva()         Sets the current record's "id_im_reteiva" value
 * @method TS_CP   setIdImReteica()         Sets the current record's "id_im_reteica" value
 * @method TS_CP   setDian()                Sets the current record's "dian" value
 * @method TS_CP   setIvaTeorico()          Sets the current record's "iva_teorico" value
 * @method TS_CP   setCodsiif()             Sets the current record's "codsiif" value
 * @method TS_CP   setCajaMenor()           Sets the current record's "caja_menor" value
 * @method TS_CP   setIdObjGasto()          Sets the current record's "id_obj_gasto" value
 * @method TS_CP   setExpsiif()             Sets the current record's "expsiif" value
 * @method TS_CP   setTiposiif()            Sets the current record's "tiposiif" value
 * @method TS_CP   setReportaDistritales()  Sets the current record's "reporta_distritales" value
 * @method TS_CP   setTSID()                Sets the current record's "TS_ID" value
 * @method TS_CP   setTSIM()                Sets the current record's "TS_IM" value
 * @method TS_CP   setTSIM3()               Sets the current record's "TS_IM_3" value
 * @method TS_CP   setTSIM4()               Sets the current record's "TS_IM_4" value
 * @method TS_CP   setTSIM2()               Sets the current record's "TS_IM_2" value
 * 
 * @package    nomina
 * @subpackage model
 * @author     Your name here
 * @version    SVN: $Id: Builder.php 7691 2011-02-04 15:43:29Z jwage $
 */
abstract class BaseTS_CP extends sfDoctrineRecord
{
    public function setTableDefinition()
    {
        $this->setTableName('TS_CP');
        $this->hasColumn('id_cp', 'integer', 20, array(
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => true,
             'length' => 20,
             ));
        $this->hasColumn('clase_cuenta', '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('abreviacion', 'string', 20, array(
             'notnull' => true,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_im_retefuente', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_im_reteiva', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('id_im_reteica', '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('iva_teorico', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0 ',
             'primary' => false,
             'length' => 1,
             ));
        $this->hasColumn('codsiif', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('caja_menor', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 1,
             'default' => '0 ',
             ));
        $this->hasColumn('id_obj_gasto', 'integer', 20, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('expsiif', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('tiposiif', 'string', 20, array(
             'notnull' => false,
             'type' => 'string',
             'fixed' => 0,
             'unsigned' => false,
             'primary' => false,
             'length' => 20,
             ));
        $this->hasColumn('reporta_distritales', 'integer', 1, array(
             'notnull' => false,
             'type' => 'integer',
             'fixed' => 0,
             'unsigned' => false,
             'default' => '0
                ',
             'primary' => false,
             'length' => 1,
             ));
    }

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

        $this->hasOne('TS_IM', array(
             'local' => 'id_im_reteica',
             'foreign' => 'id'));

        $this->hasOne('TS_IM as TS_IM_3', array(
             'local' => 'id_im_retefuente',
             'foreign' => 'id'));

        $this->hasOne('TS_IM as TS_IM_4', array(
             'local' => 'id_im_reteica',
             'foreign' => 'id'));

        $this->hasOne('TS_IM as TS_IM_2', array(
             'local' => 'id_im_reteiva',
             'foreign' => 'id'));
    }
}