-- https://www.phpmyadmin.net/
--
-- Хост: 10.0.0.33:3306
-- Время создания: Май 31 2021 г., 21:17
-- Версия сервера: 10.5.10-MariaDB-log
-- Версия PHP: 7.4.11

START TRANSACTION;



--
-- База данных: `world5saas`
--

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

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

CREATE TABLE `cases` (
  `id` int(11) NOT NULL,
  `name` varchar(256) NOT NULL,
  `contains` longtext DEFAULT NULL,
  `front` varchar(256) NOT NULL,
  `top` varchar(256) NOT NULL,
  `bottom` varchar(256) NOT NULL,
  `side` varchar(256) NOT NULL,
  `lid_front` varchar(256) NOT NULL,
  `lid_top` varchar(256) NOT NULL,
  `lid_bottom` varchar(256) NOT NULL,
  `lid_side` varchar(256) NOT NULL,
  `price` decimal(13,2) NOT NULL,
  `is_free` tinyint(2) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `cases` (`id`, `name`, `contains`, `front`, `top`, `bottom`, `side`, `lid_front`, `lid_top`, `lid_bottom`, `lid_side`, `price`, `is_free`, `created_at`, `updated_at`) VALUES
(1, 'Бронзовый', '[{\"type\":\"2\",\"value\":\"8\",\"chance\":\"30\",\"rarity\":\"none\"},{\"type\":\"1\",\"value\":\"0.25\",\"chance\":\"20\",\"rarity\":\"green\"},{\"type\":\"1\",\"value\":\"0.5\",\"chance\":\"20\",\"rarity\":\"rare\"},\r\n{\"type\":\"1\",\"value\":\"1\",\"chance\":\"20\",\"rarity\":\"purple\"}]', '/img/case/bronze/front.jpg', '/img/case/template/top.png', '/img/case/bronze/bottom.jpg', '/img/case/bronze/side.jpg', '/img/case/bronze/lid_front.jpg', '/img/case/bronze/lid_top.jpg', '/img/case/bronze/bottom.jpg', '/img/case/bronze/lid_side.jpg', '0.00', 1, '2020-02-07 19:56:02', '2020-02-07 23:03:38'),
(2, 'Серебрянный', '[{\"type\":\"2\",\"value\":\"16\",\"chance\":\"55\",\"rarity\":\"none\"},{\"type\":\"1\",\"value\":\"0.15\",\"chance\":\"77\",\"rarity\":\"green\"},{\"type\":\"1\",\"value\":\"0.5\",\"chance\":\"60\",\"rarity\":\"rare\"},\r\n{\"type\":\"1\",\"value\":\"1.5\",\"chance\":\"10\",\"rarity\":\"orange\"}]', '/img/case/silver/front.jpg', '/img/case/template/top.png', '/img/case/silver/lid_bottom.jpg', '/img/case/silver/side.jpg', '/img/case/silver/lid_front.jpg', '/img/case/silver/lid_top.jpg', '/img/case/silver/lid_bottom.jpg', '/img/case/silver/lid_side.jpg', '0.30', 0, '2020-02-07 20:06:14', '2020-02-07 20:06:14'),
(3, 'Золотой', '[{\"type\":\"1\",\"value\":\"2\",\"chance\":\"76\",\"rarity\":\"green\"},{\"type\":\"1\",\"value\":\"7\",\"chance\":\"96\",\"rarity\":\"rare\"},\r\n{\"type\":\"1\",\"value\":\"15\",\"chance\":\"1\",\"rarity\":\"purple\"},{\"type\":\"1\",\"value\":\"20\",\"chance\":\"1\",\"rarity\":\"orange\"}]', '/img/case/gold/front.jpg', '/img/case/template/top.png', '/img/case/gold/lid_bottom.jpg', '/img/case/gold/side.jpg', '/img/case/gold/lid_front.jpg', '/img/case/gold/lid_top.jpg', '/img/case/gold/lid_bottom.jpg', '/img/case/gold/lid_side.jpg', '5.00', 0, '2020-02-07 20:13:30', '2020-02-07 20:13:30'),
(4, 'Синька', '[{\"type\":\"1\",\"value\":\"10\",\"chance\":\"101\",\"rarity\":\"rare\"},{\"type\":\"1\",\"value\":\"15\",\"chance\":\"0\",\"rarity\":\"purple\"},{\"type\":\"1\",\"value\":\"45\",\"chance\":\"0\",\"rarity\":\"purple\"},{\"type\":\"1\",\"value\":\"75\",\"chance\":\"0\",\"rarity\":\"orange\"}]', '/img/case/blue/front.jpg', '/img/case/template/top.png', '/img/case/blue/lid_bottom.jpg', '/img/case/blue/side.jpg', '/img/case/blue/lid_front.jpg', '/img/case/blue/lid_top.jpg', '/img/case/blue/lid_bottom.jpg', '/img/case/blue/lid_side.jpg', '30.00', 0, '2020-02-07 20:19:42', '2020-02-07 20:19:42'),
(5, 'Зелёнка', '[{\"type\":\"1\",\"value\":\"15\",\"chance\":\"101\",\"rarity\":\"rare\"},{\"type\":\"1\",\"value\":\"30\",\"chance\":\"0\",\"rarity\":\"purple\"},{\"type\":\"1\",\"value\":\"60\",\"chance\":\"0\",\"rarity\":\"orange\"},{\"type\":\"1\",\"value\":\"100\",\"chance\":\"0\",\"rarity\":\"orange\"}]', '/img/case/green/front.jpg', '/img/case/template/top.png', '/img/case/green/lid_bottom.jpg', '/img/case/green/side.jpg', '/img/case/green/lid_front.jpg', '/img/case/green/lid_top.jpg', '/img/case/green/lid_bottom.jpg', '/img/case/green/lid_side.jpg', '45.00', 0, '2020-02-07 20:19:42', '2020-02-07 20:19:42'),
(6, 'Победный', '[{\"type\":\"1\",\"value\":\"75\",\"chance\":\"101\",\"rarity\":\"rare\"},{\"type\":\"1\",\"value\":\"175\",\"chance\":\"0\",\"rarity\":\"purple\"},{\"type\":\"1\",\"value\":\"350\",\"chance\":\"0\",\"rarity\":\"orange\"},{\"type\":\"1\",\"value\":\"800\",\"chance\":\"0\",\"rarity\":\"orange\"}]', '/img/case/platinum/front.jpg', '/img/case/template/top.png', '/img/case/platinum/lid_bottom.jpg', '/img/case/platinum/side.jpg', '/img/case/platinum/lid_front.jpg', '/img/case/platinum/lid_top.jpg', '/img/case/platinum/lid_bottom.jpg', '/img/case/platinum/lid_side.jpg', '150.00', 0, '2020-02-07 20:19:42', '2020-02-07 20:19:42');

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

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

CREATE TABLE `filtered_words` (
  `id` int(11) NOT NULL,
  `word` varchar(512) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

INSERT INTO `filtered_words` (`id`, `word`, `created_at`, `updated_at`) VALUES
(1, 'http', '2020-03-03 16:42:21', '2020-03-03 16:42:21'),
(2, 'winbee', '2020-03-03 16:42:33', '2020-03-03 16:42:33'),
(3, 'наёб', '2020-03-03 16:42:39', '2020-03-03 16:42:39'),
(4, 'scam', '2020-03-03 16:42:55', '2020-03-03 16:42:55'),
(5, 'плей2х', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(6, 'play2x', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(7, 'хуйня', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(8, 'пиздец', '2020-03-03 16:42:21', '2020-03-03 16:42:21'),
(9, 'хуй', '2020-03-03 16:42:33', '2020-03-03 16:42:33'),
(10, 'мудак', '2020-03-03 16:42:39', '2020-03-03 16:42:39'),
(11, 'гондон', '2020-03-03 16:42:55', '2020-03-03 16:42:55'),
(12, 'гандон', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(13, 'гавно', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(14, 'говно', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(15, 'блять', '2020-03-03 16:42:21', '2020-03-03 16:42:21'),
(16, 'скам', '2020-03-03 16:42:33', '2020-03-03 16:42:33'),
(17, 'наеб', '2020-03-03 16:42:39', '2020-03-03 16:42:39'),
(18, 'scaam', '2020-03-03 16:42:55', '2020-03-03 16:42:55'),
(19, 'xyz', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(20, 'play2x', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(21, 'хуйня', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(22, 'пиздец', '2020-03-03 16:42:21', '2020-03-03 16:42:21'),
(23, 'хуй', '2020-03-03 16:42:33', '2020-03-03 16:42:33'),
(24, 'мудак', '2020-03-03 16:42:39', '2020-03-03 16:42:39'),
(25, 'гондон', '2020-03-03 16:42:55', '2020-03-03 16:42:55'),
(26, 'гандон', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(27, 'гавно', '2020-03-05 16:50:50', '2020-03-05 16:50:50'),
(28, 'говно', '2020-03-05 16:50:50', '2020-03-05 16:50:50');

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

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

CREATE TABLE `games` (
  `id` int(11) NOT NULL,
  `bet` decimal(13,2) NOT NULL,
  `user_id` int(11) NOT NULL,
  `type` int(11) NOT NULL DEFAULT 0,
  `cell_1` decimal(13,2) DEFAULT NULL,
  `cell_2` decimal(13,2) DEFAULT NULL,
  `cell_3` decimal(13,2) DEFAULT NULL,
  `cell_4` varchar(1500) DEFAULT NULL,
  `status` int(11) NOT NULL,
  `win` decimal(13,2) DEFAULT NULL,
  `may_win` int(11) DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `game_id` int(11) NOT NULL DEFAULT 0,
  `multiplier` decimal(13,2) DEFAULT NULL,
  `server_seed` varchar(64) DEFAULT NULL,
  `time` int(11) DEFAULT NULL,
  `demo` tinyint(2) NOT NULL DEFAULT 0,
  `history` varchar(1000) NOT NULL DEFAULT '[]'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

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

CREATE TABLE `global_promocodes` (
  `id` int(11) NOT NULL,
  `code` varchar(256) CHARACTER SET latin1 NOT NULL,
  `usages` int(11) NOT NULL,
  `sum` decimal(13,2) NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `type` int(11) NOT NULL DEFAULT 0,
  `tick` tinyint(2) NOT NULL DEFAULT 0,
  `time` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `notifications` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `read_status` tinyint(4) NOT NULL,
  `icon` varchar(128) NOT NULL,
  `title` varchar(256) NOT NULL,
  `message` varchar(7000) NOT NULL,
  `time` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `type` varchar(64) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `payments` (
  `id` int(11) NOT NULL,
  `amount` decimal(13,2) NOT NULL,
  `user` int(11) NOT NULL,
  `time` int(11) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT current_timestamp(),
  `status` int(11) NOT NULL DEFAULT 0,
  `type` varchar(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

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

CREATE TABLE `promocodes` (
  `id` int(11) NOT NULL,
  `code` varchar(121) NOT NULL,
  `user` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `promo_bot_list` (
  `id` int(11) NOT NULL,
  `username` varchar(256) NOT NULL DEFAULT '',
  `avatar` varchar(512) NOT NULL DEFAULT '',
  `vk_public` varchar(256) NOT NULL DEFAULT '',
  `vk_id` int(11) NOT NULL,
  `tutorial` tinyint(2) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `subscriptions` (
  `id` int(11) NOT NULL,
  `json` varchar(10000) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `tasks` (
  `id` int(11) NOT NULL,
  `start_time` int(11) NOT NULL,
  `end_time` int(11) NOT NULL,
  `active` int(2) NOT NULL,
  `game_id` int(11) NOT NULL,
  `value` int(11) NOT NULL,
  `reward` decimal(13,2) NOT NULL,
  `price` decimal(13,2) NOT NULL,
  `created_at` timestamp(6) NOT NULL DEFAULT '2016-11-08 21:32:40.000000',
  `updated_at` timestamp(6) NOT NULL DEFAULT '2016-11-08 21:32:40.000000'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `transactions` (
  `id` int(11) NOT NULL,
  `sum` decimal(13,2) NOT NULL,
  `type` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `data` varchar(256) DEFAULT NULL,
  `time` int(11) NOT NULL,
  `current` decimal(13,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `withdraw` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `system` varchar(256) CHARACTER SET utf8 NOT NULL DEFAULT '',
  `wallet` varchar(25) CHARACTER SET utf8 NOT NULL,
  `amount` int(11) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Индексы сохранённых таблиц
--

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

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

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT для сохранённых таблиц
--

--
-- AUTO_INCREMENT для таблицы `cases`
--
ALTER TABLE `cases`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT для таблицы `filtered_words`
--
ALTER TABLE `filtered_words`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT для таблицы `games`
--
ALTER TABLE `games`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `global_promocodes`
--
ALTER TABLE `global_promocodes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `notifications`
--
ALTER TABLE `notifications`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `payments`
--
ALTER TABLE `payments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `promocodes`
--
ALTER TABLE `promocodes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `promo_bot_list`
--
ALTER TABLE `promo_bot_list`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `subscriptions`
--
ALTER TABLE `subscriptions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `tasks`
--
ALTER TABLE `tasks`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `withdraw`
--
ALTER TABLE `withdraw`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

