-- 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
(16, 881917897, 1, '0cef12ea3a'),
(17, 881917897, 3, '470ca97016'),
(18, 881917897, 6, 'c334e12b24'),
(21, 881917897, 0, '3e1474f651'),
(22, 881917897, 2, 'c900f4097e'),
(27, 881917897, 5, 'c9fbebfea0'),
(28, 196862160, 2, '9ffe3e0bbd'),
(29, 196862160, 1, '97d6f50158'),
(34, 196862160, 0, '7dce04f78a'),
(35, 692173303, 0, '2c334943b5'),
(36, 692173303, 7, '08e3a92ae6'),
(37, 692173303, 6, '015499e761'),
(38, 692173303, 8, 'f2e2049be9'),
(39, 692173303, 4, 'c7aa005d5b'),
(45, 7207073572, 0, 'f6f6e90dfd'),
(46, 8093984345, 0, '74a414f284'),
(49, 7931216919, 0, 'debdd4a665'),
(50, 7207073572, 4, '4b51e2709b'),
(52, 7931216919, 8, '588dd49553'),
(54, 476354915, 0, '364ca5e557'),
(56, 692173303, 5, '3e4a805f1c'),
(57, 5658401689, 0, '3e1fce61da'),
(60, 5763254898, 0, '4ecef49181'),
(62, 1637476992, 0, '6a690c1c02'),
(63, 1301962573, 0, 'fb59341e95'),
(64, 7978432087, 0, 'b50c61bc1e'),
(65, 954313564, 0, 'd1204bb25f'),
(66, 7723561862, 0, '1d7dec6ed3'),
(68, 8042006081, 0, '43b0d4d2ea'),
(70, 5988868743, 0, '9c8f7a82cc'),
(71, 8190180589, 0, '58aee43cec'),
(72, 8190180589, 8, 'c2b69f2c1a'),
(73, 8190180589, 6, 'e649832015'),
(74, 5182703277, 0, 'a2703c4516'),
(75, 6813647982, 0, '185031585a'),
(76, 6759219745, 0, 'eba03ac418'),
(77, 1024669426, 0, 'ca0db1ea5a'),
(78, 5397546035, 0, 'e0202bf9f4'),
(82, 999662193, 0, '67a5f8004c'),
(83, 8169718991, 0, '7dcacce893'),
(84, 435002967, 0, 'c55a959f51'),
(85, 2102314634, 0, 'a6d13c1c39'),
(86, 1669895757, 0, '40143c466c'),
(87, 977197471, 0, '5bf95ae81d'),
(89, 6016565655, 0, 'dd3fe31d4f'),
(90, 2093327413, 0, '0587564973'),
(91, 853977268, 1, '7b06462351'),
(92, 459715775, 4, 'e3b96824ef'),
(93, 5907828041, 0, 'e0fea91fd1'),
(95, 5846910409, 0, '10b6dc3cb7'),
(96, 853977268, 2, '1180ff9c59'),
(97, 853977268, 0, '12a5549311'),
(100, 920642816, 0, '9903de9d23'),
(101, 64626864, 0, '95c97f82ce'),
(102, 833938979, 0, 'e026dd7e23'),
(103, 5736039729, 0, '718bb6a807'),
(104, 5999629230, 2, '248a619e25'),
(105, 879743240, 0, '16407536cd'),
(106, 7629776158, 0, '79832f2493'),
(107, 8132334331, 0, '173294c3e0'),
(108, 5365784435, 0, '8474532458'),
(109, 36908555, 0, 'a5fd94cd99'),
(110, 342694787, 0, '23be3b67ef'),
(111, 7026942284, 1, '4753830501'),
(112, 158282633, 0, '94fcaf297d'),
(113, 6214131955, 0, '28da134a40'),
(114, 1179642065, 0, 'f3d19ce96e'),
(116, 692173303, 1, 'ae09beca40'),
(117, 692173303, 2, '1232acd617'),
(118, 692173303, 3, '8e3c1915f9'),
(122, 410106028, 0, '32350a4e9c'),
(123, 716523171, 0, '0603fcfc73'),
(124, 5040130139, 5, '759cf8bd75'),
(125, 6988895202, 0, '275fd81025'),
(126, 56721284, 0, 'b8e25fd0d5'),
(127, 737621167, 0, 'b9137fc6e8'),
(128, 132991395, 0, 'c28b594712'),
(130, 6995354612, 0, 'fd1b8bdcc0'),
(132, 7766109504, 0, '3a4f70079f'),
(133, 7712863044, 8, 'ef2b566220'),
(134, 733196226, 0, '49014afa85'),
(135, 170191819, 4, 'fda66fd1ea'),
(136, 7421570513, 0, '9868e34e3a'),
(144, 6576889478, 0, '9527911174'),
(145, 266808964, 0, '64e885e886'),
(146, 537113945, 0, '529b59a3e7'),
(147, 722826226, 0, 'ee169945d7'),
(148, 7795671278, 0, 'a043fec2ad'),
(149, 198667883, 0, '9f4b3c42ad'),
(150, 1275766676, 5, '08e1b159ae'),
(152, 1275766676, 0, '4fd9b494ab'),
(153, 5854967102, 0, 'e8af6e73c4'),
(154, 7806782485, 0, '441ef13f37'),
(155, 351398952, 0, 'e3e0f2aca6'),
(156, 244140282, 0, 'b45fad4d4a'),
(158, 5268853137, 0, '61683f3ed4'),
(159, 1059156127, 4, '84550d5a90'),
(162, 1322068538, 0, '0e0cdc3822'),
(164, 8059412538, 0, '1eece744e2'),
(165, 5092679511, 0, '123ce51815'),
(166, 1421105287, 0, 'b2a1a60eb1'),
(167, 441694293, 0, 'a7cda825c1'),
(168, 5743238319, 0, '010b6845c0'),
(169, 1852295764, 0, '6616b235e6'),
(170, 7451418361, 0, '77efb78e71'),
(171, 61790294, 0, 'f4ee191d45'),
(172, 123709153, 0, '9de1a20e43'),
(173, 6695314543, 0, '385aa305e7'),
(174, 6531204171, 3, '04b487b789'),
(175, 6531204171, 0, 'da4acc9b9b'),
(176, 520923163, 0, '2987db36c1'),
(177, 705919022, 0, '9178db0285'),
(178, 1393255993, 0, 'a209535f8a'),
(179, 1393255993, 2, '56750c48ef'),
(180, 339308619, 0, 'd4370b8d2e');

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

--
-- Структура таблицы `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=183;

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

