-- https://www.phpmyadmin.net/
--
-- Хост: localhost
-- Время создания: Фев 07 2026 г., 06:55
-- Версия сервера: 8.0.42-0ubuntu0.20.04.1
-- Версия PHP: 7.4.3-4ubuntu2.29

START TRANSACTION;



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

--
-- Структура таблицы `invoices`
--

CREATE TABLE `invoices` (
  `id` int NOT NULL,
  `chatid` bigint NOT NULL,
  `type` int NOT NULL,
  `invoce_code` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Дамп данных таблицы `invoices`
--

INSERT INTO `invoices` (`id`, `chatid`, `type`, `invoce_code`) VALUES
(47, 692173303, 0, '8f8d8917e3'),
(49, 7931216919, 0, 'rt7e28b3a9'),
(51, 692173303, 2, 'rt9c1b23b7'),
(52, 7207073572, 0, 'rtc488970a'),
(53, 361554819, 0, 'rt67862f69'),
(54, 692173303, 3, 'rtdfc7c32a'),
(55, 364120941, 8, 'rt0fc3671c'),
(56, 5406575638, 5, 'rtc0ffceca'),
(57, 8190180589, 1, 'rt25e4abda'),
(58, 8190180589, 5, 'rtad45a440'),
(59, 995050079, 4, 'rt0ae5af32'),
(60, 1258278427, 5, 'rt95c5854b'),
(61, 774152068, 0, 'rt60d2e13b'),
(62, 692173303, 6, 'rtecda722c'),
(63, 5246803881, 8, 'rt65ffd540'),
(64, 479941029, 6, 'rt83cd25c8'),
(65, 5875726852, 0, 'rt04a53a6d'),
(66, 7117910883, 0, 'rt77c73cd9'),
(68, 7330267277, 0, 'rtb3a06e81'),
(69, 7252234224, 2, 'rt53ef514b'),
(70, 747220617, 5, 'rtd54e8a1f'),
(71, 648596042, 5, 'rtd3d93247'),
(72, 7664538872, 5, 'rtca153197'),
(73, 1774219003, 1, 'rt5ca30f1e'),
(74, 5232445080, 1, 'rt2af2f903'),
(76, 692173303, 8, 'rt37aab78a'),
(78, 7253306904, 0, 'rtdc1a0c28'),
(79, 8169718991, 0, 'rtfbe708af'),
(80, 1573028339, 0, 'rtedc3589d'),
(81, 253771280, 0, 'rtb65f3570'),
(82, 343584810, 0, 'rt656f81e0'),
(83, 2135726355, 5, 'rta5fe2923'),
(84, 7284751221, 4, 'rtc6c6fa98'),
(85, 8145639371, 7, 'rtceaab8e7'),
(86, 6277641941, 0, 'rtd1c7beac'),
(87, 1716770560, 5, 'rt25aae80e'),
(88, 1451773649, 1, 'rt1c6a20c9'),
(89, 2112075638, 6, 'rte8bc0069'),
(90, 2112075638, 1, 'rt6d84cb62'),
(91, 5907828041, 0, 'rtc2bb37f2'),
(92, 7922479701, 4, 'rtb21b5436'),
(93, 8469626810, 0, 'rt33e61851'),
(94, 6369085534, 0, 'rtf4b3237a'),
(96, 268404661, 0, 'rtd942a066'),
(97, 799175493, 0, 'rt6c0d8456'),
(98, 823706259, 0, 'rt0c4cb454'),
(100, 692173303, 1, 'rt9024520c'),
(103, 507098010, 4, 'rtdd92ee01'),
(104, 507098010, 0, 'rt3785f226'),
(105, 835737460, 4, 'rtb6e54ff5'),
(107, 227057605, 0, 'rt7106c645'),
(110, 675532263, 1, 'rtb13c1a09'),
(111, 8542254077, 5, 'rt379ee39b'),
(112, 7180059374, 0, 'rt216a7bc3'),
(113, 483694393, 0, 'rtd160414d');

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

--
-- Структура таблицы `tasks`
--

CREATE TABLE `tasks` (
  `id` int NOT NULL,
  `dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `chatid` bigint NOT NULL,
  `is_processed` int NOT NULL DEFAULT '0',
  `data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `result` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `result_1` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `result_2` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `result_3` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `bad_task` int DEFAULT NULL,
  `bad_res` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Структура таблицы `users_answears`
--

CREATE TABLE `users_answears` (
  `id` int NOT NULL,
  `chatid` bigint NOT NULL,
  `quest_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `result` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Структура таблицы `users_screens`
--

CREATE TABLE `users_screens` (
  `id` int NOT NULL,
  `chatid` bigint NOT NULL,
  `screen` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Индексы таблицы `invoices`
--
ALTER TABLE `invoices`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `invoce_code` (`invoce_code`),
  ADD UNIQUE KEY `chatid` (`chatid`,`type`);

--
-- Индексы таблицы `tasks`
--
ALTER TABLE `tasks`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `users_answears`
--
ALTER TABLE `users_answears`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `chatid` (`chatid`,`quest_name`);

--
-- Индексы таблицы `users_screens`
--
ALTER TABLE `users_screens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `chatid` (`chatid`);

--
-- AUTO_INCREMENT для таблицы `invoices`
--
ALTER TABLE `invoices`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=114;

--
-- AUTO_INCREMENT для таблицы `tasks`
--
ALTER TABLE `tasks`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;

--
-- AUTO_INCREMENT для таблицы `users_answears`
--
ALTER TABLE `users_answears`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=488;

--
-- AUTO_INCREMENT для таблицы `users_screens`
--
ALTER TABLE `users_screens`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=286;
COMMIT;

