--
-- Host: localhost    Database: test_swedish_db
-- ------------------------------------------------------


--
-- Table structure for table `bots`
--

CREATE TABLE `bots` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` text NOT NULL,
  `token` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Dumping data for table `bots`
--


--
-- Table structure for table `dic_ads`
--

CREATE TABLE `dic_ads` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` varchar(50) NOT NULL,
  `adsid` varchar(50) NOT NULL,
  `timeStamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `userid` (`userid`),
  KEY `userid_2` (`userid`),
  KEY `adsid` (`adsid`),
  KEY `timeStamp` (`timeStamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `dic_ads`
--


--
-- Table structure for table `dic_ads_pool`
--

CREATE TABLE `dic_ads_pool` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `adsID` varchar(25) NOT NULL,
  `msgID` varchar(15) NOT NULL,
  `chatID` varchar(15) NOT NULL,
  `botID` enum('@TranslateGerman_bot','@TranslateGerman2_bot','@TranslateGerman3_bot','@Test_TranslateGerman_bot') NOT NULL,
  `adsSent` int(11) NOT NULL DEFAULT '0',
  `adsLimit` int(11) NOT NULL DEFAULT '0',
  `active` tinyint(1) NOT NULL DEFAULT '0',
  `timestamp` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `dic_ads_pool`
--


--
-- Table structure for table `dic_conjunction`
--

CREATE TABLE `dic_conjunction` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `verb` char(200) COLLATE utf8_bin NOT NULL,
  `form` char(100) CHARACTER SET utf8 NOT NULL,
  `person` char(10) COLLATE utf8_bin NOT NULL,
  `infinitive` varchar(300) COLLATE utf8_bin NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

--
-- Dumping data for table `dic_conjunction`
--


--
-- Table structure for table `dic_fasv`
--

CREATE TABLE `dic_fasv` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `word` varchar(68) DEFAULT NULL,
  `translation` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38029 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `dic_fasv`
--


--
-- Table structure for table `dic_phrases`
--

CREATE TABLE `dic_phrases` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `word` varchar(40) NOT NULL,
  `sentence` text NOT NULL,
  `translation` text NOT NULL,
  `timeStamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `dic_phrases`
--


--
-- Table structure for table `dic_suggested_users`
--

CREATE TABLE `dic_suggested_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` varchar(200) NOT NULL,
  `suggestedid` varchar(200) NOT NULL,
  `Datum` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `dic_suggested_users`
--


--
-- Table structure for table `dic_svfa`
--

CREATE TABLE `dic_svfa` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `word` varchar(69) DEFAULT NULL,
  `translation` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=32739 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `dic_svfa`
--


--
-- Table structure for table `dic_word_suggestion`
--

CREATE TABLE `dic_word_suggestion` (
  `id` int(11) NOT NULL DEFAULT '0',
  `searchedWord` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `dic_word_suggestion`
--


--
-- Table structure for table `dictionary`
--

CREATE TABLE `dictionary` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `artikel` varchar(10) NOT NULL,
  `word` text CHARACTER SET utf8 NOT NULL,
  `perfect` varchar(100) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `plural` text CHARACTER SET utf8 NOT NULL,
  `reflexive` tinyint(1) NOT NULL,
  `translation` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `example` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `exampletranslation` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `status` text CHARACTER SET utf8 NOT NULL,
  `soundFile` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `translationrate` int(11) NOT NULL,
  `searchedWord` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `dictionary`
--


--
-- Table structure for table `dictionary_merged`
--

CREATE TABLE `dictionary_merged` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `artikel` varchar(10) NOT NULL,
  `word` text CHARACTER SET utf8 NOT NULL,
  `type` varchar(20) NOT NULL,
  `perfect` varchar(100) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `plural` text CHARACTER SET utf8 NOT NULL,
  `reflexive` tinyint(1) NOT NULL,
  `translation` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `example` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `exampletranslation` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `status` text CHARACTER SET utf8 NOT NULL,
  `soundFile` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `translationrate` int(11) NOT NULL,
  `searchedWord` varchar(90) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `converted` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `searchedWord` (`searchedWord`)
) ENGINE=InnoDB AUTO_INCREMENT=260716 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `dictionary_merged`
--


--
-- Table structure for table `dicusers`
--

CREATE TABLE `dicusers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` varchar(200) CHARACTER SET latin1 NOT NULL,
  `username` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lastname` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
  `invitesent` int(11) DEFAULT '0',
  `latitude` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `longitude` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `step` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT 'userIsTranslating',
  `adminApproveStatus` varchar(300) CHARACTER SET latin1 DEFAULT NULL,
  `role` enum('USER','TRANSLATOR','EDITOR','ADMIN') CHARACTER SET latin1 NOT NULL,
  `keyboard` enum('DEACTIVATED','ACTIVATED','DISABLE','') CHARACTER SET latin1 NOT NULL,
  `trust` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `userid` (`userid`)
) ENGINE=MyISAM AUTO_INCREMENT=3007 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `dicusers`
--


--
-- Table structure for table `dicusers_bots`
--

CREATE TABLE `dicusers_bots` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `botID` enum('@TranslateSwedish_bot','@TranslateSwedish3_bot','') COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `userID` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `botID` (`botID`),
  KEY `userID` (`userID`)
) ENGINE=InnoDB AUTO_INCREMENT=3016 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `dicusers_bots`
--


--
-- Table structure for table `dicusers_contribution`
--

CREATE TABLE `dicusers_contribution` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `artikel` varchar(3) COLLATE utf8_persian_ci NOT NULL,
  `word` text CHARACTER SET utf8 NOT NULL,
  `type` varchar(20) COLLATE utf8_persian_ci NOT NULL,
  `plural` varchar(40) COLLATE utf8_persian_ci NOT NULL,
  `problemType` varchar(100) COLLATE utf8_persian_ci NOT NULL DEFAULT 'AddNewWord',
  `translation` text COLLATE utf8_persian_ci NOT NULL,
  `soundFile` varchar(50) COLLATE utf8_persian_ci DEFAULT NULL,
  `relatedWord` text COLLATE utf8_persian_ci,
  `rate` int(11) NOT NULL DEFAULT '0',
  `wordLanguage` varchar(100) COLLATE utf8_persian_ci NOT NULL,
  `userid` varchar(500) COLLATE utf8_persian_ci NOT NULL,
  `status` varchar(200) COLLATE utf8_persian_ci NOT NULL,
  `message_id` varchar(200) COLLATE utf8_persian_ci DEFAULT NULL,
  `adminOpinion` varchar(200) COLLATE utf8_persian_ci DEFAULT NULL,
  `askedByUser` varchar(200) COLLATE utf8_persian_ci DEFAULT NULL,
  `insertedTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;

--
-- Dumping data for table `dicusers_contribution`
--


--
-- Table structure for table `user_activities`
--

CREATE TABLE `user_activities` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `userid` varchar(200) COLLATE utf8_persian_ci NOT NULL,
  `intent_id` int(11) NOT NULL DEFAULT '-1',
  `searchedWord` varchar(200) COLLATE utf8_persian_ci NOT NULL,
  `translated` tinyint(1) NOT NULL,
  `trdate` datetime NOT NULL,
  `todayAsked` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `userid` (`userid`),
  KEY `searchedWord` (`searchedWord`)
) ENGINE=MyISAM AUTO_INCREMENT=10559 DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;

--
-- Dumping data for table `user_activities`
--


--
-- Temporary table structure for view `usersactivity_till_now`
--

/*!50001 DROP VIEW IF EXISTS `usersactivity_till_now`*/;
/*!50001 CREATE VIEW `usersactivity_till_now` AS SELECT 
 1 AS `userid`,
 1 AS `COUNT( userid )`*/;

--
-- Final view structure for view `usersactivity_till_now`
--

/*!50001 DROP VIEW IF EXISTS `usersactivity_till_now`*/;
/*!50001 CREATE ALGORITHM=UNDEFINED */
/*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */
/*!50001 VIEW `usersactivity_till_now` AS select `user_activities`.`userid` AS `userid`,count(`user_activities`.`userid`) AS `COUNT( userid )` from `user_activities` group by `user_activities`.`userid` order by count(`user_activities`.`userid`) desc */;


