/*
SQLyog Ultimate v8.71 
MySQL - 5.0.95 : Database - efnivr
*********************************************************************
*/


/*!40101 SET NAMES utf8 */;

/*!40101 SET SQL_MODE=''*/;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`efnivr` /*!40100 DEFAULT CHARACTER SET latin1 */;

USE `efnivr`;

/*Table structure for table `w_acpago` */

DROP TABLE IF EXISTS `w_acpago`;

CREATE TABLE `w_acpago` (
  `acu_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `acu_id_ac` mediumint(8) unsigned NOT NULL,
  `acu_tp_ac` tinyint(3) unsigned NOT NULL,
  `acu_f_ac` int(10) unsigned default NULL,
  `acu_fv_ac` int(10) unsigned default NULL,
  `acu_cdn` varchar(20) NOT NULL,
  `acu_dacu` varchar(60) NOT NULL,
  `acu_doi` varchar(20) NOT NULL,
  `acu_cap` decimal(18,2) NOT NULL,
  `acu_int` decimal(18,2) NOT NULL,
  `acu_mor` decimal(18,2) NOT NULL,
  `acu_dt_act` decimal(18,2) NOT NULL,
  `acu_mn_pac` decimal(18,2) NOT NULL COMMENT 'monto pactado',
  `acu_cts` tinyint(3) unsigned default '0',
  `acu_ct_ini` bit(1) default b'0',
  `acu_mn_cini` decimal(18,2) default NULL,
  `acu_ct_men` bit(1) default b'0',
  `acu_mn_cmen` decimal(18,2) default NULL,
  `acu_t_dsc` tinyint(3) unsigned default '0',
  `acu_dsc` decimal(18,2) default NULL,
  `acu_mtv` varchar(50) default NULL,
  `acu_es_ac` tinyint(3) unsigned NOT NULL,
  PRIMARY KEY  (`acu_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=114 DEFAULT CHARSET=latin1;

/*Data for the table `w_acpago` */

/*Table structure for table `w_alter` */

DROP TABLE IF EXISTS `w_alter`;

CREATE TABLE `w_alter` (
  `alt_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `alt_tp` tinyint(3) unsigned NOT NULL default '0',
  `alt_cprg` tinyint(3) unsigned NOT NULL default '0',
  `alt_prm` tinyint(3) unsigned NOT NULL default '0',
  `alt_nom` varchar(100) NOT NULL default '',
  PRIMARY KEY  (`alt_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=latin1;

/*Data for the table `w_alter` */

/*Table structure for table `w_autadm` */

DROP TABLE IF EXISTS `w_autadm`;

CREATE TABLE `w_autadm` (
  `aut_cdadm` mediumint(8) unsigned NOT NULL auto_increment,
  `aut_cusadm` mediumint(8) unsigned NOT NULL,
  `aut_fcradm` int(10) unsigned NOT NULL,
  `aut_tcadm` tinyint(3) unsigned NOT NULL,
  `aut_nusadm` varchar(30) NOT NULL,
  `aut_cntadm` varchar(30) character set utf8 collate utf8_bin NOT NULL,
  `aut_ce_adm` varchar(80) character set utf8 collate utf8_bin NOT NULL,
  PRIMARY KEY  (`aut_cdadm`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

/*Data for the table `w_autadm` */

/*Table structure for table `w_auten` */

DROP TABLE IF EXISTS `w_auten`;

CREATE TABLE `w_auten` (
  `aut_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `aut_cusu` mediumint(8) unsigned NOT NULL,
  `aut_freg` int(10) unsigned NOT NULL,
  `aut_fcreg` int(10) unsigned NOT NULL,
  `aut_cest` tinyint(3) unsigned NOT NULL,
  `aut_ctpr` tinyint(3) unsigned NOT NULL,
  `aut_nusu` varchar(30) NOT NULL,
  `aut_cntr` varchar(30) character set utf8 collate utf8_bin NOT NULL,
  `aut_cor_e` varchar(80) character set utf8 collate utf8_bin NOT NULL,
  `aut_nsms` tinyint(3) unsigned NOT NULL,
  `aut_uses` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`aut_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=307 DEFAULT CHARSET=latin1;

/*Data for the table `w_auten` */

/*Table structure for table `w_cat` */

DROP TABLE IF EXISTS `w_cat`;

CREATE TABLE `w_cat` (
  `cat_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `cat_cdcli` varchar(23) NOT NULL,
  `cat_rgcli` varchar(23) NOT NULL,
  `cat_cdcar` mediumint(8) NOT NULL,
  `cat_doi` varchar(20) NOT NULL,
  `cat_id_ac` varchar(20) NOT NULL,
  `cat_f_cmp` int(10) unsigned default NULL,
  `cat_f_vnt` int(10) unsigned default NULL,
  PRIMARY KEY  (`cat_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=129 DEFAULT CHARSET=latin1;

/*Data for the table `w_cat` */

/*Table structure for table `w_categoriasms` */

DROP TABLE IF EXISTS `w_categoriasms`;

CREATE TABLE `w_categoriasms` (
  `cat_id` int(11) NOT NULL auto_increment,
  `cat_desc` varchar(50) default NULL,
  `cat_registro` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `cod_estado` int(11) default '1',
  PRIMARY KEY  (`cat_id`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

/*Data for the table `w_categoriasms` */

/*Table structure for table `w_conf` */

DROP TABLE IF EXISTS `w_conf`;

CREATE TABLE `w_conf` (
  `cnf_codsis` mediumint(8) unsigned NOT NULL auto_increment,
  `cnf_nomsis` varchar(20) NOT NULL,
  `cnf_dscsis` varchar(60) NOT NULL,
  `cnf_npreg` tinyint(3) unsigned NOT NULL,
  `cnf_tpreg` int(10) unsigned NOT NULL,
  `cnf_rtmp_exp` int(10) unsigned NOT NULL,
  `cnf_dexp_acu` int(10) unsigned NOT NULL,
  `cnf_dexp_cmp` int(10) unsigned NOT NULL,
  `cnf_coetau` varchar(10) NOT NULL,
  `cnf_coenau` varchar(10) NOT NULL,
  `cnf_coetenc` varchar(10) NOT NULL,
  `cnf_coesrv` varchar(50) NOT NULL,
  `cnf_coeprt` int(10) unsigned NOT NULL,
  `cnf_coeusu` varchar(50) NOT NULL,
  `cnf_coecnt` varchar(50) NOT NULL,
  `cnf_coecc` varchar(70) NOT NULL,
  `cnf_t_cdsms` int(10) unsigned NOT NULL,
  `cnf_ndsms` tinyint(3) unsigned NOT NULL,
  `cnf_encf` varchar(100) NOT NULL,
  PRIMARY KEY  (`cnf_codsis`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `w_conf` */

/*Table structure for table `w_cont` */

DROP TABLE IF EXISTS `w_cont`;

CREATE TABLE `w_cont` (
  `cnt_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `cnt_csol` mediumint(8) unsigned NOT NULL,
  `cnt_fsol` int(10) unsigned NOT NULL,
  `cnt_est` tinyint(3) unsigned NOT NULL,
  `cnt_nomb` varchar(75) character set utf8 collate utf8_bin NOT NULL,
  `cnt_cor_e` varchar(80) character set utf8 collate utf8_bin NOT NULL,
  `cnt_asun` varchar(160) character set utf8 collate utf8_bin NOT NULL,
  `cnt_mens` varchar(250) character set utf8 collate utf8_bin NOT NULL,
  PRIMARY KEY  (`cnt_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=83 DEFAULT CHARSET=latin1;

/*Data for the table `w_cont` */

/*Table structure for table `w_crit_o` */

DROP TABLE IF EXISTS `w_crit_o`;

CREATE TABLE `w_crit_o` (
  `criof_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `criof_monto1` int(10) unsigned default NULL,
  `criof_monto2` int(10) unsigned default NULL,
  `criof_desc_m` int(10) unsigned default NULL,
  `criof_1_part` int(10) unsigned default NULL,
  `criof_2_part` int(10) unsigned default NULL,
  `criof_3_part` decimal(4,2) default NULL,
  `criof_p_max` int(10) unsigned default NULL,
  `criof_c_ini` int(10) unsigned default NULL,
  PRIMARY KEY  (`criof_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;

/*Data for the table `w_crit_o` */

/*Table structure for table `w_crit_r` */

DROP TABLE IF EXISTS `w_crit_r`;

CREATE TABLE `w_crit_r` (
  `crirf_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `crirf_monto1` int(10) unsigned default NULL,
  `crirf_monto2` int(10) unsigned default NULL,
  `crirf_desc_s` decimal(3,2) default NULL,
  `crirf_desc_m` decimal(3,2) default NULL,
  `crirf_ncuota` int(10) unsigned default NULL,
  `crirf_mcuota` int(10) unsigned default NULL,
  PRIMARY KEY  (`crirf_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

/*Data for the table `w_crit_r` */

/*Table structure for table `w_dacpag` */

DROP TABLE IF EXISTS `w_dacpag`;

CREATE TABLE `w_dacpag` (
  `dac_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `dac_id_ac` mediumint(8) unsigned NOT NULL,
  `dac_cd_cli` varchar(21) NOT NULL,
  `dac_nomb` varchar(75) NOT NULL,
  `dac_rg_cli` varchar(23) NOT NULL,
  `dac_id_crt` char(10) default NULL,
  `dac_cnt` varchar(50) NOT NULL,
  `dac_prd` varchar(100) NOT NULL,
  `dac_bnc` varchar(100) NOT NULL,
  `dac_cap` decimal(18,2) NOT NULL,
  `dac_a_mor` char(4) NOT NULL,
  `dac_int` decimal(18,0) NOT NULL,
  `dac_mor` decimal(18,2) NOT NULL,
  `dac_d_act` decimal(18,2) NOT NULL,
  PRIMARY KEY  (`dac_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=142 DEFAULT CHARSET=latin1;

/*Data for the table `w_dacpag` */

/*Table structure for table `w_dcbloq` */

DROP TABLE IF EXISTS `w_dcbloq`;

CREATE TABLE `w_dcbloq` (
  `dcb_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `dcb_doc` varchar(20) NOT NULL,
  `dcb_fec` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`dcb_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=705 DEFAULT CHARSET=latin1;

/*Data for the table `w_dcbloq` */

/*Table structure for table `w_dcbrec` */

DROP TABLE IF EXISTS `w_dcbrec`;

CREATE TABLE `w_dcbrec` (
  `dcr_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `dcr_doc` varchar(20) NOT NULL,
  `dcr_fec` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`dcr_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

/*Data for the table `w_dcbrec` */

/*Table structure for table `w_emladinc` */

DROP TABLE IF EXISTS `w_emladinc`;

CREATE TABLE `w_emladinc` (
  `ain_cod` int(10) unsigned NOT NULL auto_increment,
  `plan_cod` int(10) unsigned default NULL,
  `ain_rut` varchar(255) NOT NULL,
  `ain_cor` int(10) default NULL,
  `ain_n_orig` varchar(255) NOT NULL,
  PRIMARY KEY  (`ain_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=63 DEFAULT CHARSET=latin1;

/*Data for the table `w_emladinc` */

/*Table structure for table `w_emladjar` */

DROP TABLE IF EXISTS `w_emladjar`;

CREATE TABLE `w_emladjar` (
  `aar_cod` int(10) unsigned NOT NULL auto_increment,
  `plan_cod` int(10) unsigned default NULL,
  `aar_rut` varchar(255) NOT NULL,
  `aar_cor` int(10) default NULL,
  `aar_n_orig` varchar(255) NOT NULL,
  PRIMARY KEY  (`aar_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=132 DEFAULT CHARSET=latin1;

/*Data for the table `w_emladjar` */

/*Table structure for table `w_emlband` */

DROP TABLE IF EXISTS `w_emlband`;

CREATE TABLE `w_emlband` (
  `id_band` int(11) NOT NULL auto_increment,
  `message_id` varchar(255) NOT NULL,
  `remitente` varchar(200) default NULL,
  `mail_remitente` varchar(255) default NULL,
  `asunt` varchar(255) default NULL,
  `fecha` datetime default NULL,
  `encoding` varchar(200) default NULL,
  `texto` text,
  `registro` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `estado` int(2) NOT NULL default '1',
  PRIMARY KEY  (`id_band`)
) ENGINE=MyISAM AUTO_INCREMENT=2910 DEFAULT CHARSET=utf8;

/*Data for the table `w_emlband` */

/*Table structure for table `w_emlcat` */

DROP TABLE IF EXISTS `w_emlcat`;

CREATE TABLE `w_emlcat` (
  `cat_cod` int(10) NOT NULL auto_increment,
  `cat_dsc` varchar(100) NOT NULL,
  `cat_reg` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `cat_est` int(10) NOT NULL default '1',
  PRIMARY KEY  (`cat_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlcat` */

/*Table structure for table `w_emlcnf` */

DROP TABLE IF EXISTS `w_emlcnf`;

CREATE TABLE `w_emlcnf` (
  `cnf_cod` int(10) unsigned NOT NULL auto_increment,
  `cnf_coetau` varchar(10) NOT NULL,
  `cnf_coenau` varchar(10) NOT NULL,
  `cnf_coetenc` varchar(10) NOT NULL,
  `cnf_coesrv` varchar(50) NOT NULL,
  `cnf_coeprt` int(10) unsigned NOT NULL,
  `cnf_coeusu` varchar(50) NOT NULL,
  `cnf_coecnt` varchar(50) NOT NULL,
  `cnf_coecc` varchar(100) default NULL,
  `cnf_fvdom` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`cnf_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlcnf` */

/*Table structure for table `w_emlcnts` */

DROP TABLE IF EXISTS `w_emlcnts`;

CREATE TABLE `w_emlcnts` (
  `cnts_cod` int(10) unsigned NOT NULL auto_increment,
  `cnts_coeusu` varchar(50) NOT NULL,
  `cnts_coecnt` varchar(50) NOT NULL,
  `cnts_coeali` varchar(200) default NULL,
  PRIMARY KEY  (`cnts_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlcnts` */

/*Table structure for table `w_emlmsg` */

DROP TABLE IF EXISTS `w_emlmsg`;

CREATE TABLE `w_emlmsg` (
  `msg_cod` int(10) unsigned NOT NULL auto_increment,
  `msg_cenv` int(10) unsigned NOT NULL,
  `msg_fec` int(11) NOT NULL,
  `msg_tipo` mediumint(8) unsigned NOT NULL default '0',
  `msg_rem` varchar(50) NOT NULL,
  `msg_cco` varchar(50) NOT NULL,
  `msg_asn` varchar(250) NOT NULL,
  `msg_tex` text NOT NULL,
  `msg_reg` int(10) NOT NULL,
  `msg_est` int(1) NOT NULL default '1',
  `msg_dst` varchar(50) NOT NULL,
  `msg_seq` int(10) NOT NULL,
  PRIMARY KEY  (`msg_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=95028 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlmsg` */

/*Table structure for table `w_emlparam` */

DROP TABLE IF EXISTS `w_emlparam`;

CREATE TABLE `w_emlparam` (
  `par_cod` int(10) NOT NULL auto_increment,
  `par_al1` int(10) NOT NULL default '0' COMMENT 'tiempo aleatorio1',
  `par_al2` int(10) NOT NULL default '0' COMMENT 'tiempo aleatorio2',
  `par_alc` int(10) NOT NULL default '0' COMMENT 'aleatorio entre cuentas',
  `cat_cod` int(10) NOT NULL default '0',
  `plan_cod` int(10) NOT NULL default '0',
  `cnts_cod` int(10) NOT NULL default '0',
  `par_csv` varchar(255) NOT NULL,
  PRIMARY KEY  (`par_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=366 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlparam` */

/*Table structure for table `w_emlplan` */

DROP TABLE IF EXISTS `w_emlplan`;

CREATE TABLE `w_emlplan` (
  `plan_cod` int(10) unsigned NOT NULL auto_increment,
  `cat_cod` int(10) NOT NULL,
  `plan_fec` int(10) unsigned default NULL,
  `plan_asn` varchar(50) NOT NULL,
  `plan_msg` text NOT NULL,
  `plan_reg` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `plan_est` int(10) NOT NULL default '1',
  PRIMARY KEY  (`plan_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=128 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlplan` */

/*Table structure for table `w_emlprs` */

DROP TABLE IF EXISTS `w_emlprs`;

CREATE TABLE `w_emlprs` (
  `prs_cod` int(10) unsigned NOT NULL auto_increment,
  `prs_id` int(10) NOT NULL,
  `prs_est` int(1) NOT NULL,
  `prs_fech` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`prs_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlprs` */

insert  into `w_emlprs`(`prs_cod`,`prs_id`,`prs_est`,`prs_fech`) values (12,0,0,0);

/*Table structure for table `w_emlsmp` */

DROP TABLE IF EXISTS `w_emlsmp`;

CREATE TABLE `w_emlsmp` (
  `msg_cod` int(10) unsigned NOT NULL auto_increment,
  `msg_dst` varchar(200) default NULL COMMENT 'destinatatio',
  `msg_asn` varchar(200) NOT NULL,
  `msg_tex` text,
  `aar_cod` int(10) unsigned default NULL,
  `ain_cod` int(10) unsigned default NULL,
  `msg_reg` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `msg_est` int(1) NOT NULL default '1',
  `msg_siscob` int(1) default '1',
  `cnts_cod` int(2) NOT NULL,
  PRIMARY KEY  (`msg_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=61 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlsmp` */

/*Table structure for table `w_emlveqv` */

DROP TABLE IF EXISTS `w_emlveqv`;

CREATE TABLE `w_emlveqv` (
  `veqv_cod` int(10) unsigned NOT NULL auto_increment,
  `veqv_dcor` varchar(180) NOT NULL,
  `veqv_dsrv` varchar(180) NOT NULL,
  `veqv_est` int(1) unsigned NOT NULL,
  PRIMARY KEY  (`veqv_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlveqv` */

/*Table structure for table `w_emlvexc` */

DROP TABLE IF EXISTS `w_emlvexc`;

CREATE TABLE `w_emlvexc` (
  `vexc_cod` int(10) unsigned NOT NULL auto_increment,
  `vexc_nomb` varchar(180) NOT NULL,
  `vexc_fech` int(10) unsigned NOT NULL,
  `vexc_est` int(1) unsigned NOT NULL,
  PRIMARY KEY  (`vexc_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=1596 DEFAULT CHARSET=latin1;

/*Data for the table `w_emlvexc` */

/*Table structure for table `w_estdeu` */

DROP TABLE IF EXISTS `w_estdeu`;

CREATE TABLE `w_estdeu` (
  `est_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `est_id_ac` varchar(20) NOT NULL,
  `est_id_est` varchar(20) NOT NULL,
  `est_cdcli` varchar(23) NOT NULL,
  `est_rgcli` varchar(23) NOT NULL,
  `est_idcart` char(10) NOT NULL,
  `est_est` tinyint(3) unsigned NOT NULL,
  `est_doi` varchar(20) NOT NULL,
  PRIMARY KEY  (`est_cod`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `w_estdeu` */

/*Table structure for table `w_estdeudet` */

DROP TABLE IF EXISTS `w_estdeudet`;

CREATE TABLE `w_estdeudet` (
  `std_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `std_id_est` varchar(20) NOT NULL,
  `std_n_ct` tinyint(3) unsigned NOT NULL,
  `std_tp_ct` tinyint(3) unsigned NOT NULL,
  `std_mnt_pgr` decimal(18,2) NOT NULL,
  `std_f_pgr` int(10) unsigned default NULL,
  `std_mnt_pgd` tinyint(3) unsigned NOT NULL,
  `std_f_pgd` int(10) unsigned default NULL,
  PRIMARY KEY  (`std_cod`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `w_estdeudet` */

/*Table structure for table `w_ivrvest` */

DROP TABLE IF EXISTS `w_ivrvest`;

CREATE TABLE `w_ivrvest` (
  `est_cod` int(10) unsigned NOT NULL auto_increment,
  `est_num` varchar(20) NOT NULL,
  `est_est` int(2) NOT NULL,
  `est_fech` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`est_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=209308 DEFAULT CHARSET=latin1;

/*Data for the table `w_ivrvest` */

/*Table structure for table `w_ivrvparam` */

DROP TABLE IF EXISTS `w_ivrvparam`;

CREATE TABLE `w_ivrvparam` (
  `par_cod` int(10) NOT NULL auto_increment,
  `par_nv` int(2) NOT NULL default '0',
  `par_ret` int(1) NOT NULL default '0',
  `par_exc` int(1) NOT NULL default '0',
  `par_csv` varchar(255) NOT NULL,
  PRIMARY KEY  (`par_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

/*Data for the table `w_ivrvparam` */

insert  into `w_ivrvparam`(`par_cod`,`par_nv`,`par_ret`,`par_exc`,`par_csv`) values (4,1,1,1,'2019-12-15-10-47-31env_IVRPRUEBA.csv');

/*Table structure for table `w_ivrvprs` */

DROP TABLE IF EXISTS `w_ivrvprs`;

CREATE TABLE `w_ivrvprs` (
  `prs_cod` int(10) unsigned NOT NULL auto_increment,
  `prs_id` int(10) NOT NULL,
  `prs_est` int(1) NOT NULL,
  `prs_fech` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`prs_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=latin1;

/*Data for the table `w_ivrvprs` */

insert  into `w_ivrvprs`(`prs_cod`,`prs_id`,`prs_est`,`prs_fech`) values (11,0,0,0);

/*Table structure for table `w_objt` */

DROP TABLE IF EXISTS `w_objt`;

CREATE TABLE `w_objt` (
  `obj_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `obj_tp` tinyint(3) unsigned NOT NULL default '0',
  `obj_nom` varchar(30) NOT NULL,
  `obj_des` varchar(60) NOT NULL,
  PRIMARY KEY  (`obj_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

/*Data for the table `w_objt` */

/*Table structure for table `w_plantillasms` */

DROP TABLE IF EXISTS `w_plantillasms`;

CREATE TABLE `w_plantillasms` (
  `idplantilla` int(11) NOT NULL auto_increment,
  `idcategoria` int(11) default NULL,
  `nombre` varchar(200) default NULL,
  `texto` varchar(200) default NULL,
  `registro` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `estado` int(11) NOT NULL default '1',
  PRIMARY KEY  (`idplantilla`)
) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=latin1;

/*Data for the table `w_plantillasms` */

/*Table structure for table `w_preg` */

DROP TABLE IF EXISTS `w_preg`;

CREATE TABLE `w_preg` (
  `prg_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `prg_preg_p1` varchar(255) character set utf8 collate utf8_bin NOT NULL default '',
  `prg_preg_p2` varchar(255) character set utf8 collate utf8_bin NOT NULL default '',
  `prg_preg_p3` varchar(255) character set utf8 collate utf8_bin NOT NULL default '',
  PRIMARY KEY  (`prg_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;

/*Data for the table `w_preg` */

/*Table structure for table `w_prom` */

DROP TABLE IF EXISTS `w_prom`;

CREATE TABLE `w_prom` (
  `prm_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `prm_cusu` varchar(8) NOT NULL,
  `prm_codcli` varchar(24) NOT NULL,
  `prm_doc` varchar(20) NOT NULL,
  `prm_codsol` mediumint(8) unsigned NOT NULL,
  `prm_fec` datetime default NULL,
  `prm_sol` varchar(50) default NULL,
  `prm_mot` varchar(8) default NULL,
  `prm_ini` varchar(9) default NULL,
  PRIMARY KEY  (`prm_cod`),
  UNIQUE KEY `prm_codsol` (`prm_codsol`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;

/*Data for the table `w_prom` */

/*Table structure for table `w_recur` */

DROP TABLE IF EXISTS `w_recur`;

CREATE TABLE `w_recur` (
  `rec_cod` mediumint(8) unsigned NOT NULL default '0',
  `rec_telf` mediumint(8) unsigned NOT NULL default '0',
  `rec_ubig` varchar(6) character set utf8 collate utf8_bin NOT NULL default '',
  `rec_domi` varchar(90) character set utf8 collate utf8_bin NOT NULL default '',
  `rec_dref` char(2) character set utf8 collate utf8_bin NOT NULL default '',
  `rec_dist` varchar(30) character set utf8 collate utf8_bin NOT NULL default '',
  `rec_empr` varchar(70) character set utf8 collate utf8_bin NOT NULL default '',
  `rec_anio` year(4) NOT NULL default '1970',
  PRIMARY KEY  (`rec_cod`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `w_recur` */

/*Table structure for table `w_refe` */

DROP TABLE IF EXISTS `w_refe`;

CREATE TABLE `w_refe` (
  `ref_cod` mediumint(8) unsigned NOT NULL default '0',
  `ref_tip` char(2) character set utf8 collate utf8_bin NOT NULL default '',
  `ref_des` varchar(15) character set utf8 collate utf8_bin NOT NULL default '',
  PRIMARY KEY  (`ref_cod`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `w_refe` */

/*Table structure for table `w_regval` */

DROP TABLE IF EXISTS `w_regval`;

CREATE TABLE `w_regval` (
  `rvl_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `rvl_scod` varchar(50) NOT NULL,
  `rvl_paso0` varchar(20) NOT NULL,
  `rvl_f_paso0` int(10) unsigned NOT NULL,
  `rvl_doi` varchar(20) NOT NULL,
  `rvl_blq` tinyint(3) unsigned default NULL,
  `rvl_paso1` varchar(20) default NULL,
  `rvl_f_paso1` int(10) unsigned default NULL,
  `rvl_o_prg` varchar(20) default NULL,
  `rvl_c_prg0` tinyint(3) unsigned default NULL,
  `rvl_f_prg0` int(10) unsigned default NULL,
  `rvl_t_prg0` varchar(150) default NULL,
  `rvl_r_p_prg0` varchar(50) default NULL,
  `rvl_a_r_prg0` varchar(250) default NULL,
  `rvl_c_r_prg0` tinyint(3) unsigned default NULL,
  `rvl_f_r_prg0` int(10) unsigned default NULL,
  `rvl_t_r_prg0` varchar(50) default NULL,
  `rvl_c_prg1` tinyint(3) unsigned default NULL,
  `rvl_f_prg1` int(10) unsigned default NULL,
  `rvl_t_prg1` varchar(150) default NULL,
  `rvl_r_p_prg1` varchar(50) default NULL,
  `rvl_a_r_prg1` varchar(250) default NULL,
  `rvl_c_r_prg1` tinyint(3) unsigned default NULL,
  `rvl_f_r_prg1` int(10) unsigned default NULL,
  `rvl_t_r_prg1` varchar(50) default NULL,
  `rvl_c_prg2` tinyint(3) unsigned default NULL,
  `rvl_f_prg2` int(10) unsigned default NULL,
  `rvl_t_prg2` varchar(150) default NULL,
  `rvl_r_p_prg2` varchar(50) default NULL,
  `rvl_a_r_prg2` varchar(250) default NULL,
  `rvl_c_r_prg2` tinyint(3) unsigned default NULL,
  `rvl_f_r_prg2` int(10) unsigned default NULL,
  `rvl_t_r_prg2` varchar(50) default NULL,
  `rvl_c_prg3` tinyint(3) unsigned default NULL,
  `rvl_f_prg3` int(10) unsigned default NULL,
  `rvl_t_prg3` varchar(150) default NULL,
  `rvl_r_p_prg3` varchar(50) default NULL,
  `rvl_a_r_prg3` varchar(250) default NULL,
  `rvl_c_r_prg3` tinyint(3) unsigned default NULL,
  `rvl_f_r_prg3` int(10) unsigned default NULL,
  `rvl_t_r_prg3` varchar(50) default NULL,
  `rvl_c_prg4` tinyint(3) unsigned default NULL,
  `rvl_f_prg4` int(10) unsigned default NULL,
  `rvl_t_prg4` varchar(150) default NULL,
  `rvl_r_p_prg4` varchar(50) default NULL,
  `rvl_a_r_prg4` varchar(250) default NULL,
  `rvl_c_r_prg4` tinyint(3) unsigned default NULL,
  `rvl_f_r_prg4` int(10) unsigned default NULL,
  `rvl_t_r_prg4` varchar(50) default NULL,
  `rvl_r_paso1` varchar(20) default NULL,
  `rvl_f_r_paso1` int(10) unsigned default NULL,
  `rvl_paso2` varchar(20) default NULL,
  `rvl_f_paso2` int(10) unsigned default NULL,
  `rvl_nc_cli` varchar(90) default NULL,
  `rvl_fc_cli` int(10) unsigned default NULL,
  `rvl_ub_cli` varchar(6) default NULL,
  `rvl_dr_cli` varchar(120) default NULL,
  `rvl_tl_cli` varchar(40) default NULL,
  `rvl_rt_cli` varchar(10) default NULL,
  `rvl_tm_cli` varchar(40) default NULL,
  `rvl_nm_usu` varchar(20) default NULL,
  `rvl_cn_usu` varchar(30) default NULL,
  `rvl_ce_usu` varchar(50) default NULL,
  `rvl_f_c_paso2` int(10) unsigned default NULL,
  `rvl_paso3` varchar(20) default NULL,
  `rvl_f_paso3` int(10) unsigned default NULL,
  `rvl_r_paso3` varchar(20) default NULL,
  `rvl_f_r_paso3` int(10) unsigned default NULL,
  `rvl_cc_usu` varchar(600) default NULL,
  PRIMARY KEY  (`rvl_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=904 DEFAULT CHARSET=latin1;

/*Data for the table `w_regval` */

/*Table structure for table `w_sms` */

DROP TABLE IF EXISTS `w_sms`;

CREATE TABLE `w_sms` (
  `efnsms_cod` int(11) NOT NULL auto_increment,
  `efnsms_id` int(11) default NULL,
  `efnsms_tip` int(11) default NULL COMMENT '1 bandeja;2masivo;3simple',
  `efnsms_num` varchar(10) default NULL,
  `efnsms_msg` varchar(200) default NULL,
  `efnsms_frcv` datetime default NULL,
  `efnsms_est` int(100) default NULL,
  `efnsms_err` varchar(100) default NULL,
  `efnsms_fenv` datetime default NULL,
  `efnsms_can` varchar(12) default NULL,
  `efnsms_reg` timestamp NOT NULL default CURRENT_TIMESTAMP,
  `efnsms_imei` varchar(100) default NULL,
  `efnsms_siscob` int(1) NOT NULL default '1',
  PRIMARY KEY  (`efnsms_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=6342 DEFAULT CHARSET=latin1;

/*Data for the table `w_sms` */

/*Table structure for table `w_smsband` */

DROP TABLE IF EXISTS `w_smsband`;

CREATE TABLE `w_smsband` (
  `id_band` int(11) NOT NULL auto_increment,
  `id_api` int(11) default NULL,
  `fech_env` datetime default NULL,
  `fech_rec` datetime default NULL,
  `numero` varchar(15) NOT NULL,
  `texto` varchar(255) NOT NULL,
  `estado` varchar(2) default NULL,
  `canal` varchar(100) default NULL,
  `imei` varchar(100) default NULL,
  `registro` timestamp NOT NULL default CURRENT_TIMESTAMP,
  PRIMARY KEY  (`id_band`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `w_smsband` */

/*Table structure for table `w_smsbloq` */

DROP TABLE IF EXISTS `w_smsbloq`;

CREATE TABLE `w_smsbloq` (
  `smb_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `smb_cusu` varchar(20) NOT NULL,
  `smb_fec` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`smb_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=515 DEFAULT CHARSET=latin1;

/*Data for the table `w_smsbloq` */

/*Table structure for table `w_smscod` */

DROP TABLE IF EXISTS `w_smscod`;

CREATE TABLE `w_smscod` (
  `smscd_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `smscd_num` char(6) default NULL,
  `smscd_cusu` mediumint(8) unsigned NOT NULL,
  `smscd_fcsm` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`smscd_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=68 DEFAULT CHARSET=latin1;

/*Data for the table `w_smscod` */

/*Table structure for table `w_temp` */

DROP TABLE IF EXISTS `w_temp`;

CREATE TABLE `w_temp` (
  `tmp_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `tmp_ccnf` varchar(50) NOT NULL,
  `tmp_cusu` int(10) unsigned NOT NULL,
  `tmp_fcnf` int(10) unsigned NOT NULL,
  `tmp_ecnf` tinyint(3) unsigned default NULL,
  PRIMARY KEY  (`tmp_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=320 DEFAULT CHARSET=latin1;

/*Data for the table `w_temp` */

/*Table structure for table `w_ubigeo` */

DROP TABLE IF EXISTS `w_ubigeo`;

CREATE TABLE `w_ubigeo` (
  `ubi_cod` varchar(6) NOT NULL,
  `ubi_dpto` varchar(2) NOT NULL,
  `ubi_prov` varchar(2) default NULL,
  `ubi_dist` varchar(2) default NULL,
  `ubi_ndpto` varchar(14) default NULL,
  `ubi_nprov` varchar(25) default NULL,
  `ubi_ndist` varchar(30) default NULL,
  PRIMARY KEY  (`ubi_cod`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

/*Data for the table `w_ubigeo` */

/*Table structure for table `w_usua` */

DROP TABLE IF EXISTS `w_usua`;

CREATE TABLE `w_usua` (
  `usu_cod` mediumint(8) unsigned NOT NULL auto_increment,
  `usu_cusu` mediumint(8) unsigned NOT NULL,
  `usu_nomb` varchar(75) character set utf8 collate utf8_bin default NULL,
  `usu_doc` varchar(20) NOT NULL,
  `usu_fnac` int(10) unsigned default NULL,
  `usu_dpto` char(2) default NULL,
  `usu_prov` char(2) default NULL,
  `usu_dist` char(2) default NULL,
  `usu_dir` varchar(100) character set utf8 collate utf8_bin default NULL,
  `usu_telf` varchar(40) default NULL,
  `usu_rtelf` char(2) default NULL,
  `usu_tlmv` varchar(40) default NULL,
  PRIMARY KEY  (`usu_cod`)
) ENGINE=MyISAM AUTO_INCREMENT=290 DEFAULT CHARSET=latin1;

/*Data for the table `w_usua` */

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
