--
-- Host: localhost    Database: intranet
-- ------------------------------------------------------


--
-- Table structure for table `avaliacao_tecnicos`
--

CREATE TABLE `avaliacao_tecnicos` (
  `id` varchar(5) NOT NULL,
  `id_tec` varchar(2) NOT NULL,
  `aval_os` varchar(25) NOT NULL,
  `aval_nota` int(1) NOT NULL,
  `aval_data` date NOT NULL,
  `aval_hora` time NOT NULL,
  `aval_sts` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id_tec` (`id_tec`,`aval_os`,`aval_nota`),
  KEY `aval_data` (`aval_data`,`aval_hora`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `avaliacao_tecnicos`
--

INSERT INTO `avaliacao_tecnicos` VALUES ('0001','01','118544',1,'2017-06-05','14:02:32',0),('0002','03','34536',1,'2017-06-05','17:50:30',0),('0003','01','118544',1,'2017-06-13','11:27:30',0),('0004','03','11020',0,'2017-06-15','15:50:30',0),('0005','02','11002',0,'2017-06-20','15:50:30',0),('0006','01','25411',1,'2017-06-10','09:32:51',0);

--
-- Table structure for table `cod`
--

CREATE TABLE `cod` (
  `tab` varchar(35) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `valor` varchar(8) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `qtd_crt` int(1) NOT NULL,
  PRIMARY KEY (`tab`),
  KEY `valor` (`valor`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cod`
--

INSERT INTO `cod` VALUES ('avaliacao_tecnicos','0007',4),('env_sms','0',1),('log','00005',5);

--
-- Table structure for table `env_sms`
--

CREATE TABLE `env_sms` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `id_cliente` varchar(7) COLLATE utf8_unicode_ci NOT NULL,
  `nome_cli` varchar(75) COLLATE utf8_unicode_ci NOT NULL,
  `nome_remet` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `num_cli` varchar(11) COLLATE utf8_unicode_ci NOT NULL,
  `sms_msg` text COLLATE utf8_unicode_ci NOT NULL,
  `data_envio` date NOT NULL,
  `hora_envio` time NOT NULL,
  `prot_interno` varchar(24) COLLATE utf8_unicode_ci NOT NULL,
  `token_servidor` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  KEY `id_cliente` (`id_cliente`,`nome_cli`,`nome_remet`),
  KEY `data_envio` (`data_envio`,`hora_envio`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `env_sms`
--

INSERT INTO `env_sms` VALUES (1,'14474','DOUGLAS AMARO DA SILVA','ROOT','64992698043','Teste para o DB. - Lanteca Telecom','2017-06-10','20:34:27','2017.06.10.20.34.27.505','d8ffa6d2b2bb5c62395dac344bd9a0a0'),(2,'14474','DOUGLAS AMARO DA SILVA','ROOT','64992698043','Envio de SMS. - Lanteca Telecom','2017-06-10','21:11:52','2017.06.10.21.11.52.426','c3f73caef21a8423c9c4032a65c1752f'),(3,'14474','DOUGLAS AMARO DA SILVA','ROOT','64992395513','Teste - Lanteca Telecom','2017-06-10','21:13:23','2017.06.10.21.13.23.748','dff947d36da813d44ae639666338d445'),(4,'14474','DOUGLAS AMARO DA SILVA','ROOT','64992698043','Teste, vamos la. - Lanteca Telecom','2017-06-11','00:56:50','2017.06.11.00.56.50.039','25e12716bbcfad61ef0d37461a44c4f7'),(5,'14474','DOUGLAS AMARO DA SILVA','ROOT','64992698043','Teste, vamos la. - Lanteca Telecom','2017-06-11','00:58:41','2017.06.11.00.58.41.140','a0686cde4d7c2134e46d3dd349315e19'),(6,'13235','WILSON RITT IGLESIAS','ROOT','64999961315','Ssasssda - Lanteca Telecom','2017-06-11','01:58:16','2017.06.11.01.58.16.338','1d6a55d03072e8407b953b1206034ea6'),(7,'8750','ANTUNES MARCELO CORREIA GOMES','ROOT','64992916529','Teste de mensagen - Lanteca Telecom','2017-06-11','13:14:35','2017.06.11.13.14.35.767','670894bd0aceb1ca78079a31371c09cd');

--
-- Table structure for table `log`
--

CREATE TABLE `log` (
  `id` varchar(5) COLLATE utf8_unicode_ci NOT NULL,
  `id_usu` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
  `nome_usuario` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `data_eve` date NOT NULL,
  `hora_eve` time NOT NULL,
  `evento` text COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `log`
--

INSERT INTO `log` VALUES ('00001','001','ROOT','2017-06-11','00:56:50','Usuario ROOT enviou SMS para o cliente Douglas amaro da silva'),('00002','001','ROOT','2017-06-11','00:58:41','Usuario ROOT enviou SMS para o cliente Douglas amaro da silva'),('00003','001','ROOT','2017-06-11','01:58:16','Usuario ROOT enviou SMS para o cliente Wilson ritt iglesias'),('00004','001','ROOT','2017-06-11','13:14:35','Usuario ROOT enviou SMS para o cliente Antunes marcelo correia gomes');

--
-- Table structure for table `tecnicos`
--

CREATE TABLE `tecnicos` (
  `id` varchar(2) NOT NULL,
  `tec_nome` varchar(25) NOT NULL,
  `tec_sts` int(1) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `tec_nome` (`tec_nome`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `tecnicos`
--

INSERT INTO `tecnicos` VALUES ('01','DOUGLAS',0),('02','WILSON',0),('03','NATANAEL',0);

--
-- Table structure for table `usuariomodulos`
--

CREATE TABLE `usuariomodulos` (
  `id_usu` int(2) NOT NULL,
  `usu_nome` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `env_sms` int(1) NOT NULL,
  `lan_os` int(1) NOT NULL,
  `run_sql` int(1) NOT NULL,
  PRIMARY KEY (`id_usu`),
  KEY `usu_nome` (`usu_nome`,`env_sms`),
  KEY `run_sql` (`run_sql`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `usuariomodulos`
--

INSERT INTO `usuariomodulos` VALUES (1,'DOUGLAS',1,1,0),(2,'WILSON',1,1,0),(3,'B',1,0,0);


