-- https://www.phpmyadmin.net/
--




--
-- Database: `telegram_german_bot`
--

-- --------------------------------------------------------

--
-- Stand-in structure for view `activity_by_month`
-- (See below for the actual view)
--
CREATE TABLE `activity_by_month` (
`MONTH(trdate)` int(2)
,`COUNT(*)` bigint(21)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `activity_till_now`
-- (See below for the actual view)
--
CREATE TABLE `activity_till_now` (
`userid` varchar(200)
,`COUNT( userid )` bigint(21)
);

-- --------------------------------------------------------

--
-- Table structure for table `bayadic_dictionary_contribution_de_fa`
--

CREATE TABLE `bayadic_dictionary_contribution_de_fa` (
  `id` int(11) NOT NULL,
  `artikel` varchar(10) DEFAULT NULL,
  `word` varchar(600) CHARACTER SET utf8 DEFAULT NULL,
  `perfect` varchar(100) CHARACTER SET utf8 COLLATE utf8_persian_ci DEFAULT NULL,
  `plural` text CHARACTER SET utf8,
  `hasProposition` tinyint(1) NOT NULL DEFAULT '0',
  `reflexive` tinyint(1) DEFAULT NULL,
  `translation` varchar(750) CHARACTER SET utf8 DEFAULT NULL,
  `wordType` enum('noun','verb','adjective','adverb','proposition','conjunction','other') DEFAULT NULL,
  `minusRate` int(11) NOT NULL DEFAULT '0',
  `plusRate` int(11) NOT NULL DEFAULT '0',
  `related` tinyint(1) NOT NULL DEFAULT '0',
  `status` enum('open','trusted','approved','rejected','closed','needToEdit','wrong','requested','review') DEFAULT NULL,
  `wordID` varchar(50) NOT NULL,
  `userID` varchar(50) NOT NULL,
  `insertedTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bayadic_dictionary_de_fa`
--

CREATE TABLE `bayadic_dictionary_de_fa` (
  `id` int(11) NOT NULL,
  `artikel` varchar(10) NOT NULL,
  `word` varchar(250) CHARACTER SET utf8 NOT NULL,
  `perfect` varchar(100) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `plural` text CHARACTER SET utf8 NOT NULL,
  `hasProposition` tinyint(1) NOT NULL DEFAULT '0',
  `reflexive` tinyint(1) DEFAULT NULL,
  `translation` varchar(650) CHARACTER SET utf8 NOT NULL,
  `wordType` enum('noun','verb','adjective','adverb','proposition','conjunction','other') NOT NULL,
  `minusRate` int(11) NOT NULL DEFAULT '0',
  `plusRate` int(11) NOT NULL DEFAULT '0',
  `related` tinyint(1) NOT NULL DEFAULT '0',
  `status` enum('open','trusted','approved','rejected','closed','needToEdit','wrong','requested','review') NOT NULL,
  `wordID` varchar(50) NOT NULL,
  `userID` varchar(50) NOT NULL,
  `insertedTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `bayadic_rated_words_de_fa`
--

CREATE TABLE `bayadic_rated_words_de_fa` (
  `id` int(11) NOT NULL,
  `wordID` varchar(50) NOT NULL,
  `userID` varchar(50) NOT NULL,
  `plusRate` tinyint(1) NOT NULL,
  `minusRate` tinyint(1) NOT NULL,
  `insertedTime` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `bayadic_related_words_de_fa`
--

CREATE TABLE `bayadic_related_words_de_fa` (
  `id` int(11) NOT NULL DEFAULT '0',
  `word` varchar(700) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

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

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

-- --------------------------------------------------------

--
-- Table structure for table `currency_price`
--

CREATE TABLE `currency_price` (
  `id` int(11) NOT NULL,
  `primary_currency` varchar(10) DEFAULT NULL,
  `exchange_currency` varchar(10) DEFAULT NULL,
  `price` float DEFAULT NULL,
  `number_of_requests` int(11) NOT NULL DEFAULT '0',
  `last_update` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Stand-in structure for view `currency_used_per_day`
-- (See below for the actual view)
--
CREATE TABLE `currency_used_per_day` (
`day` date
,`usedTimes` decimal(42,0)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `currency_users`
-- (See below for the actual view)
--
CREATE TABLE `currency_users` (
`userid` varchar(200)
,`number_of_used` bigint(21)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `currency_users_and_day`
-- (See below for the actual view)
--
CREATE TABLE `currency_users_and_day` (
`day` date
,`userid` varchar(200)
,`usedTimes` bigint(21)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `currency_users_per_day`
-- (See below for the actual view)
--
CREATE TABLE `currency_users_per_day` (
`day` date
,`users_quantity` bigint(21)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `currency_users_today`
-- (See below for the actual view)
--
CREATE TABLE `currency_users_today` (
`userid` varchar(200)
,`count(userid)` bigint(21)
);

-- --------------------------------------------------------

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

CREATE TABLE `dictionary` (
  `id` int(11) NOT NULL,
  `artikel` varchar(10) NOT NULL,
  `type` 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` varchar(300) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `dictionary_english`
--

CREATE TABLE `dictionary_english` (
  `id` bigint(20) NOT NULL,
  `artikel` varchar(10) NOT NULL,
  `word` text CHARACTER SET utf8 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,
  `category` varchar(100) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `wordType` varchar(100) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `status` text CHARACTER SET utf8 NOT NULL,
  `translationrate` int(11) NOT NULL,
  `searchedWord` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

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

CREATE TABLE `dictionary_merged` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

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

CREATE TABLE `dicusers` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- --------------------------------------------------------

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

CREATE TABLE `dicusers_bots` (
  `id` int(11) NOT NULL,
  `botID` enum('@TranslateGerman_bot','@TranslateGerman2_bot','@TranslateGerman3_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
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- --------------------------------------------------------

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

CREATE TABLE `dicusers_contribution` (
  `id` int(11) NOT NULL,
  `artikel` varchar(3) COLLATE utf8_persian_ci DEFAULT NULL,
  `word` text CHARACTER SET utf8 NOT NULL,
  `type` varchar(20) COLLATE utf8_persian_ci DEFAULT NULL,
  `plural` varchar(40) COLLATE utf8_persian_ci DEFAULT NULL,
  `problemType` varchar(100) COLLATE utf8_persian_ci NOT NULL DEFAULT 'AddNewWord',
  `translation` text COLLATE utf8_persian_ci,
  `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 DEFAULT NULL,
  `userid` varchar(500) COLLATE utf8_persian_ci DEFAULT NULL,
  `status` varchar(200) COLLATE utf8_persian_ci DEFAULT 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
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;

-- --------------------------------------------------------

--
-- Table structure for table `dicusers_english`
--

CREATE TABLE `dicusers_english` (
  `id` int(11) NOT NULL,
  `userid` varchar(200) NOT NULL,
  `username` varchar(200) NOT NULL,
  `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `lastname` varchar(200) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `dicusers_old`
--

CREATE TABLE `dicusers_old` (
  `id` int(11) NOT NULL,
  `userid` varchar(200) NOT NULL,
  `username` varchar(200) NOT NULL,
  `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `lastname` varchar(200) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `invitesent` int(11) NOT NULL DEFAULT '0',
  `step` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT 'userIsTranslating',
  `adminApproveStatus` varchar(30) NOT NULL DEFAULT 'none',
  `role` enum('USER','TRANSLATOR','EDITOR','ADMIN') NOT NULL,
  `keyboard` enum('DEACTIVATED','ACTIVATED','DISABLE','') NOT NULL,
  `trust` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

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

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

-- --------------------------------------------------------

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

CREATE TABLE `dic_ads_pool` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

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

CREATE TABLE `dic_conjunction` (
  `id` int(11) NOT NULL,
  `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
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- --------------------------------------------------------

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

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

-- --------------------------------------------------------

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

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

-- --------------------------------------------------------

--
-- Table structure for table `dic_suggested_users_english`
--

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

-- --------------------------------------------------------

--
-- 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;

-- --------------------------------------------------------

--
-- Table structure for table `hints`
--

CREATE TABLE `hints` (
  `id` int(11) NOT NULL,
  `pattern` varchar(50) NOT NULL,
  `intent` varchar(20) NOT NULL,
  `timeStamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Table structure for table `intents`
--

CREATE TABLE `intents` (
  `id` int(11) NOT NULL,
  `name` varchar(15) NOT NULL,
  `intent_id` int(11) NOT NULL DEFAULT '100',
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Stand-in structure for view `ocr_used_per_day`
-- (See below for the actual view)
--
CREATE TABLE `ocr_used_per_day` (
`day` date
,`usedTimes` bigint(21)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `ocr_users_per_day`
-- (See below for the actual view)
--
CREATE TABLE `ocr_users_per_day` (
`day` date
,`users` bigint(21)
);

-- --------------------------------------------------------

--
-- Table structure for table `quiz`
--

CREATE TABLE `quiz` (
  `id` int(11) NOT NULL,
  `name` varchar(300) NOT NULL,
  `userid` varchar(300) NOT NULL,
  `channelName` varchar(300) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `quiz_answers`
--

CREATE TABLE `quiz_answers` (
  `id` int(11) NOT NULL,
  `questionID` int(11) NOT NULL,
  `answer` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `isRight` tinyint(1) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `quiz_questions`
--

CREATE TABLE `quiz_questions` (
  `id` int(11) NOT NULL,
  `question` text CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `quizID` int(11) NOT NULL,
  `imageUrl` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `quiz_scores`
--

CREATE TABLE `quiz_scores` (
  `id` int(11) NOT NULL,
  `quizID` int(11) NOT NULL,
  `usercallbackID` varchar(300) NOT NULL,
  `score` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `quiz_users`
--

CREATE TABLE `quiz_users` (
  `id` int(11) NOT NULL,
  `userid` varchar(200) NOT NULL,
  `username` varchar(200) NOT NULL,
  `name` varchar(200) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `lastname` varchar(200) CHARACTER SET utf8 COLLATE utf8_persian_ci NOT NULL,
  `invitesent` int(11) NOT NULL,
  `step` varchar(100) CHARACTER SET utf8 NOT NULL,
  `adminApproveStatus` varchar(300) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `quiz_users_asnwers`
--

CREATE TABLE `quiz_users_asnwers` (
  `id` bigint(20) NOT NULL,
  `userid` varchar(300) NOT NULL,
  `answerID` int(11) NOT NULL,
  `questionID` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Stand-in structure for view `speech2text_used_per_day`
-- (See below for the actual view)
--
CREATE TABLE `speech2text_used_per_day` (
`day` date
,`usedTimes` bigint(21)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `speech2text_users_per_day`
-- (See below for the actual view)
--
CREATE TABLE `speech2text_users_per_day` (
`day` date
,`users` bigint(21)
);

-- --------------------------------------------------------

--
-- Stand-in structure for view `users_today`
-- (See below for the actual view)
--
CREATE TABLE `users_today` (
`userid` varchar(200)
,`count(userid)` bigint(21)
);

-- --------------------------------------------------------

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

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

-- --------------------------------------------------------

--
-- Table structure for table `user_activities_01_10_2020`
--

CREATE TABLE `user_activities_01_10_2020` (
  `id` int(11) NOT NULL,
  `userid` varchar(200) COLLATE utf8_persian_ci NOT NULL,
  `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'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;

-- --------------------------------------------------------

--
-- Table structure for table `user_activities_06_01`
--

CREATE TABLE `user_activities_06_01` (
  `id` int(11) NOT NULL,
  `userid` varchar(200) COLLATE utf8_persian_ci NOT NULL,
  `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'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_persian_ci;

-- --------------------------------------------------------

--
-- Table structure for table `user_activities_25_11_2020`
--

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

-- --------------------------------------------------------

--
-- Structure for view `activity_by_month`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `activity_by_month`  AS  select month(`user_activities`.`trdate`) AS `MONTH(trdate)`,count(0) AS `COUNT(*)` from `user_activities` group by month(`user_activities`.`trdate`) ;

-- --------------------------------------------------------

--
-- Structure for view `activity_till_now`
--

CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `activity_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 ;

-- --------------------------------------------------------

--
-- Structure for view `currency_used_per_day`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `currency_used_per_day`  AS  select `currency_users_and_day`.`day` AS `day`,sum(`currency_users_and_day`.`usedTimes`) AS `usedTimes` from `currency_users_and_day` group by `currency_users_and_day`.`day` ;

-- --------------------------------------------------------

--
-- Structure for view `currency_users`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `currency_users`  AS  select `user_activities`.`userid` AS `userid`,count(`user_activities`.`userid`) AS `number_of_used` from `user_activities` where (`user_activities`.`intent_id` = 1) group by `user_activities`.`userid` order by count(`user_activities`.`userid`) desc ;

-- --------------------------------------------------------

--
-- Structure for view `currency_users_and_day`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `currency_users_and_day`  AS  select cast(`user_activities`.`trdate` as date) AS `day`,`user_activities`.`userid` AS `userid`,count(`user_activities`.`userid`) AS `usedTimes` from `user_activities` where (`user_activities`.`intent_id` = 1) group by `user_activities`.`userid`,cast(`user_activities`.`trdate` as date) ;

-- --------------------------------------------------------

--
-- Structure for view `currency_users_per_day`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `currency_users_per_day`  AS  select `currency_users_and_day`.`day` AS `day`,count(`currency_users_and_day`.`userid`) AS `users_quantity` from `currency_users_and_day` group by `currency_users_and_day`.`day` ;

-- --------------------------------------------------------

--
-- Structure for view `currency_users_today`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `currency_users_today`  AS  select `user_activities`.`userid` AS `userid`,count(`user_activities`.`userid`) AS `count(userid)` from `user_activities` where ((`user_activities`.`intent_id` = 1) and (cast(`user_activities`.`trdate` as date) = curdate())) group by `user_activities`.`userid` ;

-- --------------------------------------------------------

--
-- Structure for view `ocr_used_per_day`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ocr_used_per_day`  AS  select `table2`.`day` AS `day`,count(`table2`.`userid`) AS `usedTimes` from (select cast(`user_activities`.`trdate` as date) AS `day`,`user_activities`.`userid` AS `userid`,count(`user_activities`.`userid`) AS `usedTimes` from `user_activities` where (`user_activities`.`intent_id` = 4) group by `user_activities`.`userid`,`user_activities`.`trdate`) `table2` group by `table2`.`day` order by `table2`.`day` desc ;

-- --------------------------------------------------------

--
-- Structure for view `ocr_users_per_day`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `ocr_users_per_day`  AS  select cast(`user_activities`.`trdate` as date) AS `day`,count(`user_activities`.`userid`) AS `users` from `user_activities` where (`user_activities`.`intent_id` = 4) group by cast(`user_activities`.`trdate` as date) order by `day` desc ;

-- --------------------------------------------------------

--
-- Structure for view `speech2text_used_per_day`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `speech2text_used_per_day`  AS  select `table2`.`day` AS `day`,count(`table2`.`userid`) AS `usedTimes` from (select cast(`user_activities`.`trdate` as date) AS `day`,`user_activities`.`userid` AS `userid`,count(`user_activities`.`userid`) AS `usedTimes` from `user_activities` where (`user_activities`.`intent_id` = 5) group by `user_activities`.`userid`,`user_activities`.`trdate`) `table2` group by `table2`.`day` order by `table2`.`day` desc ;

-- --------------------------------------------------------

--
-- Structure for view `speech2text_users_per_day`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `speech2text_users_per_day`  AS  select cast(`user_activities`.`trdate` as date) AS `day`,count(`user_activities`.`userid`) AS `users` from `user_activities` where (`user_activities`.`intent_id` = 5) group by cast(`user_activities`.`trdate` as date) order by `day` desc ;

-- --------------------------------------------------------

--
-- Structure for view `users_today`
--

CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `users_today`  AS  select `user_activities`.`userid` AS `userid`,count(`user_activities`.`userid`) AS `count(userid)` from `user_activities` where (cast(`user_activities`.`trdate` as date) = curdate()) group by `user_activities`.`userid` order by count(`user_activities`.`userid`) desc ;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bayadic_dictionary_contribution_de_fa`
--
ALTER TABLE `bayadic_dictionary_contribution_de_fa`
  ADD PRIMARY KEY (`id`),
  ADD KEY `word` (`word`),
  ADD KEY `translation` (`translation`);

--
-- Indexes for table `bayadic_dictionary_de_fa`
--
ALTER TABLE `bayadic_dictionary_de_fa`
  ADD PRIMARY KEY (`id`),
  ADD KEY `word` (`word`),
  ADD KEY `translation` (`translation`);

--
-- Indexes for table `bayadic_rated_words_de_fa`
--
ALTER TABLE `bayadic_rated_words_de_fa`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `bayadic_related_words_de_fa`
--
ALTER TABLE `bayadic_related_words_de_fa`
  ADD KEY `word` (`word`);

--
-- Indexes for table `bots`
--
ALTER TABLE `bots`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `currency_price`
--
ALTER TABLE `currency_price`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dictionary`
--
ALTER TABLE `dictionary`
  ADD PRIMARY KEY (`id`),
  ADD KEY `searchedWord` (`searchedWord`),
  ADD KEY `id` (`id`);

--
-- Indexes for table `dictionary_english`
--
ALTER TABLE `dictionary_english`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dictionary_merged`
--
ALTER TABLE `dictionary_merged`
  ADD PRIMARY KEY (`id`),
  ADD KEY `searchedWord` (`searchedWord`);

--
-- Indexes for table `dicusers`
--
ALTER TABLE `dicusers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`);

--
-- Indexes for table `dicusers_bots`
--
ALTER TABLE `dicusers_bots`
  ADD PRIMARY KEY (`id`),
  ADD KEY `botID` (`botID`),
  ADD KEY `userID` (`userID`);

--
-- Indexes for table `dicusers_contribution`
--
ALTER TABLE `dicusers_contribution`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dicusers_english`
--
ALTER TABLE `dicusers_english`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dicusers_old`
--
ALTER TABLE `dicusers_old`
  ADD PRIMARY KEY (`id`),
  ADD KEY `username` (`username`),
  ADD KEY `userid` (`userid`);

--
-- Indexes for table `dic_ads`
--
ALTER TABLE `dic_ads`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`),
  ADD KEY `userid_2` (`userid`),
  ADD KEY `adsid` (`adsid`),
  ADD KEY `timeStamp` (`timeStamp`);

--
-- Indexes for table `dic_ads_pool`
--
ALTER TABLE `dic_ads_pool`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dic_conjunction`
--
ALTER TABLE `dic_conjunction`
  ADD PRIMARY KEY (`id`),
  ADD KEY `verb` (`verb`),
  ADD KEY `infinitive` (`infinitive`);

--
-- Indexes for table `dic_phrases`
--
ALTER TABLE `dic_phrases`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dic_suggested_users`
--
ALTER TABLE `dic_suggested_users`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `dic_suggested_users_english`
--
ALTER TABLE `dic_suggested_users_english`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `hints`
--
ALTER TABLE `hints`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `intents`
--
ALTER TABLE `intents`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quiz`
--
ALTER TABLE `quiz`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quiz_answers`
--
ALTER TABLE `quiz_answers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quiz_questions`
--
ALTER TABLE `quiz_questions`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quiz_scores`
--
ALTER TABLE `quiz_scores`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quiz_users`
--
ALTER TABLE `quiz_users`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `quiz_users_asnwers`
--
ALTER TABLE `quiz_users_asnwers`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `user_activities`
--
ALTER TABLE `user_activities`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`),
  ADD KEY `searchedWord` (`searchedWord`);

--
-- Indexes for table `user_activities_01_10_2020`
--
ALTER TABLE `user_activities_01_10_2020`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`),
  ADD KEY `searchedWord` (`searchedWord`);

--
-- Indexes for table `user_activities_06_01`
--
ALTER TABLE `user_activities_06_01`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`),
  ADD KEY `searchedWord` (`searchedWord`);

--
-- Indexes for table `user_activities_25_11_2020`
--
ALTER TABLE `user_activities_25_11_2020`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`),
  ADD KEY `searchedWord` (`searchedWord`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bayadic_dictionary_contribution_de_fa`
--
ALTER TABLE `bayadic_dictionary_contribution_de_fa`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27547;
--
-- AUTO_INCREMENT for table `bayadic_dictionary_de_fa`
--
ALTER TABLE `bayadic_dictionary_de_fa`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=303926;
--
-- AUTO_INCREMENT for table `bayadic_rated_words_de_fa`
--
ALTER TABLE `bayadic_rated_words_de_fa`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3466;
--
-- AUTO_INCREMENT for table `bots`
--
ALTER TABLE `bots`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `currency_price`
--
ALTER TABLE `currency_price`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `dictionary`
--
ALTER TABLE `dictionary`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=257703;
--
-- AUTO_INCREMENT for table `dictionary_english`
--
ALTER TABLE `dictionary_english`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=92920;
--
-- AUTO_INCREMENT for table `dictionary_merged`
--
ALTER TABLE `dictionary_merged`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=260716;
--
-- AUTO_INCREMENT for table `dicusers`
--
ALTER TABLE `dicusers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=146953;
--
-- AUTO_INCREMENT for table `dicusers_bots`
--
ALTER TABLE `dicusers_bots`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=286574;
--
-- AUTO_INCREMENT for table `dicusers_contribution`
--
ALTER TABLE `dicusers_contribution`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72219;
--
-- AUTO_INCREMENT for table `dicusers_english`
--
ALTER TABLE `dicusers_english`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=256;
--
-- AUTO_INCREMENT for table `dicusers_old`
--
ALTER TABLE `dicusers_old`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=68682;
--
-- AUTO_INCREMENT for table `dic_ads`
--
ALTER TABLE `dic_ads`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=286158;
--
-- AUTO_INCREMENT for table `dic_ads_pool`
--
ALTER TABLE `dic_ads_pool`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;
--
-- AUTO_INCREMENT for table `dic_conjunction`
--
ALTER TABLE `dic_conjunction`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=287559;
--
-- AUTO_INCREMENT for table `dic_phrases`
--
ALTER TABLE `dic_phrases`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=286652;
--
-- AUTO_INCREMENT for table `dic_suggested_users`
--
ALTER TABLE `dic_suggested_users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13156;
--
-- AUTO_INCREMENT for table `dic_suggested_users_english`
--
ALTER TABLE `dic_suggested_users_english`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `hints`
--
ALTER TABLE `hints`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `intents`
--
ALTER TABLE `intents`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `quiz`
--
ALTER TABLE `quiz`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=227;
--
-- AUTO_INCREMENT for table `quiz_answers`
--
ALTER TABLE `quiz_answers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3442;
--
-- AUTO_INCREMENT for table `quiz_questions`
--
ALTER TABLE `quiz_questions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1161;
--
-- AUTO_INCREMENT for table `quiz_scores`
--
ALTER TABLE `quiz_scores`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35867;
--
-- AUTO_INCREMENT for table `quiz_users`
--
ALTER TABLE `quiz_users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3720;
--
-- AUTO_INCREMENT for table `quiz_users_asnwers`
--
ALTER TABLE `quiz_users_asnwers`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=181301;
--
-- AUTO_INCREMENT for table `user_activities`
--
ALTER TABLE `user_activities`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2146356;
--
-- AUTO_INCREMENT for table `user_activities_01_10_2020`
--
ALTER TABLE `user_activities_01_10_2020`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12149238;
--
-- AUTO_INCREMENT for table `user_activities_06_01`
--
ALTER TABLE `user_activities_06_01`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1106178;
--
-- AUTO_INCREMENT for table `user_activities_25_11_2020`
--
ALTER TABLE `user_activities_25_11_2020`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17529571;
