-- Database export via SQLPro (https://www.sqlprostudio.com/allapps.html)
-- Exported by Vlad at 05-02-2024 18:43.
-- WARNING: This file may contain descructive statements such as DROPs.
-- Please ensure that you are running the script at the proper location.


-- BEGIN TABLE answers
CREATE TABLE `answers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `temp_id` int(11) NOT NULL DEFAULT '0',
  `text` text CHARACTER SET utf8mb4 NOT NULL,
  `photo` varchar(255) NOT NULL DEFAULT '',
  `sleep` int(2) NOT NULL DEFAULT '0',
  `callback` varchar(50) NOT NULL,
  `btn_upd` varchar(2555) NOT NULL,
  `sub_channel` varchar(255) NOT NULL,
  `del` int(1) NOT NULL DEFAULT '0',
  `num` int(11) NOT NULL DEFAULT '0',
  `type` int(11) NOT NULL DEFAULT '0',
  `captcha` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- Inserting 7 rows into answers
-- Insert batch #1
INSERT INTO answers (id, project_id, temp_id, `text`, photo, sleep, callback, btn_upd, sub_channel, del, num, type, captcha) VALUES
(2, 2, 1, '<b>Привет [first_name]!</b>', '', 0, '', '', '', 0, 0, 0, 0),
(5, 2, 1, '[captcha|2+2]', '', 0, '', '', '', 0, 1, 0, 1),
(6, 2, 1, 'Супер!)', '', 0, '', '', '', 0, 2, 0, 0),
(7, 2, 1, 'Кликай', '', 0, '', 'Хмм::https://dfdfdf.ru/', '', 0, 3, 1, 0),
(14, 3, 2, 'привет', '', 0, '', '', '', 0, 0, 0, 0),
(15, 3, 2, '[captcha|2+2]', '', 0, '', '', '', 0, 1, 0, 1),
(16, 3, 2, 'Поздравляем!', '', 0, '', 'Переходи::https://t.me/', '', 0, 2, 1, 0);

-- END TABLE answers

-- BEGIN TABLE bots
CREATE TABLE `bots` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `list_id` int(11) NOT NULL,
  `temp_id` int(11) NOT NULL DEFAULT '0',
  `chat_id` bigint(60) NOT NULL DEFAULT '0',
  `token` varchar(200) NOT NULL DEFAULT '0',
  `username` varchar(200) NOT NULL DEFAULT '0',
  `date_created` varchar(50) NOT NULL DEFAULT '0',
  `status` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `chat_id` (`chat_id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

-- Inserting 2 rows into bots
-- Insert batch #1
INSERT INTO bots (id, project_id, list_id, temp_id, chat_id, token, username, date_created, status) VALUES
(2, 2, 0, 1, 1733858601, '1733858601:AAH6TeO8Gn3f4cyc4qCApF1O8PJC4LibU8U', 'IGMeSpyBot', '2022-02-22 18:54:38', 2),
(10, 3, 0, 2, 6472632246, '6472632246:AAGH9qjh30f6garRLZc1Wi1C6X6oD3bn8ig', 'bdgdfgcvbot', '2024-02-05 09:27:40', 0);

-- END TABLE bots

-- BEGIN TABLE bots_list
CREATE TABLE `bots_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `updated_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- Table bots_list contains no data. No inserts have been genrated.
-- Inserting 0 rows into bots_list


-- END TABLE bots_list

-- BEGIN TABLE buttons
CREATE TABLE `buttons` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `temp_id` int(11) NOT NULL DEFAULT '0',
  `answer_id` int(11) NOT NULL DEFAULT '0',
  `name` varchar(255) CHARACTER SET utf8mb4 NOT NULL,
  `action` varchar(255) NOT NULL,
  `num` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

-- Inserting 2 rows into buttons
-- Insert batch #1
INSERT INTO buttons (id, project_id, temp_id, answer_id, name, `action`, num) VALUES
(1, 2, 1, 7, 'Клик', 'upd_button', 1),
(3, 3, 2, 16, 'Кликай', 'upd_button', 1);

-- END TABLE buttons

-- BEGIN TABLE jsr_bots
CREATE TABLE `jsr_bots` (
  `id` bigint(20) NOT NULL,
  `uid` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `username` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Table jsr_bots contains no data. No inserts have been genrated.
-- Inserting 0 rows into jsr_bots


-- END TABLE jsr_bots

-- BEGIN TABLE jsr_bundles
CREATE TABLE `jsr_bundles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` bigint(20) NOT NULL,
  `bid` bigint(20) NOT NULL,
  `rid` bigint(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- Table jsr_bundles contains no data. No inserts have been genrated.
-- Inserting 0 rows into jsr_bundles


-- END TABLE jsr_bundles

-- BEGIN TABLE jsr_members
CREATE TABLE `jsr_members` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `chat_id` bigint(20) NOT NULL,
  `bid` bigint(20) NOT NULL,
  `rid` bigint(20) NOT NULL,
  `joined_at` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

-- Inserting 3 rows into jsr_members
-- Insert batch #1
INSERT INTO jsr_members (id, chat_id, bid, rid, joined_at, status) VALUES
(25, 1519632168, 5296140202, 1910501074, 1707132064, 1),
(26, 6281647682, 5296140202, 1910501074, 1707132086, 1),
(27, 5944848503, 5296140202, 1910501074, 1707132098, 1);

-- END TABLE jsr_members

-- BEGIN TABLE jsr_resources
CREATE TABLE `jsr_resources` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `invite_link` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1910501075 DEFAULT CHARSET=utf8;

-- Table jsr_resources contains no data. No inserts have been genrated.
-- Inserting 0 rows into jsr_resources


-- END TABLE jsr_resources

-- BEGIN TABLE jsr_senders
CREATE TABLE `jsr_senders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uid` int(11) NOT NULL,
  `bind_id` int(11) NOT NULL,
  `text` text NOT NULL,
  `is_preview` int(11) NOT NULL,
  `media` varchar(255) NOT NULL,
  `buttons` text NOT NULL,
  `success` int(11) NOT NULL,
  `errors` int(11) NOT NULL,
  `type` varchar(25) NOT NULL,
  `send_at` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- Table jsr_senders contains no data. No inserts have been genrated.
-- Inserting 0 rows into jsr_senders


-- END TABLE jsr_senders

-- BEGIN TABLE msgs
CREATE TABLE `msgs` (
  `id` int(11) NOT NULL,
  `bot_id` bigint(20) NOT NULL,
  `chat_id` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Table msgs contains no data. No inserts have been genrated.
-- Inserting 0 rows into msgs


-- END TABLE msgs

-- BEGIN TABLE notify
CREATE TABLE `notify` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(20) NOT NULL,
  `users_ids` varchar(255) NOT NULL DEFAULT '0',
  `new_members` int(1) NOT NULL DEFAULT '0',
  `new_del_bots` int(1) NOT NULL DEFAULT '0',
  `token` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- Inserting 2 rows into notify
-- Insert batch #1
INSERT INTO notify (id, project_id, users_ids, new_members, new_del_bots, token) VALUES
(1, 2, '1655299685', 1, 1, '5196208029:AAEAnOdbd6Gj6Ov9CCv4nErTYZdSQd1pC5Q'),
(2, 3, '5237877655', 1, 1, '5823389397:AAFfh5WRCHMmYzY7asL3Ovv_j9ZxfhhhJws');

-- END TABLE notify

-- BEGIN TABLE projects
CREATE TABLE `projects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `hash` varchar(255) NOT NULL DEFAULT '',
  `date_created` varchar(50) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- Inserting 2 rows into projects
-- Insert batch #1
INSERT INTO projects (id, user_id, name, hash, date_created) VALUES
(2, 0, 'dfdf', 'c73f9c62d15dab8779ef', '2022-02-22 15:26:45'),
(3, 1, 'dfdfgfdg', 'e141e013a81d996f75f8', '2024-02-05 09:01:59');

-- END TABLE projects

-- BEGIN TABLE senders
CREATE TABLE `senders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `message` text CHARACTER SET utf8mb4 NOT NULL,
  `name_button` varchar(255) NOT NULL DEFAULT '0',
  `url_button` varchar(255) NOT NULL DEFAULT '0',
  `image` varchar(255) NOT NULL DEFAULT '',
  `time` int(1) NOT NULL DEFAULT '0',
  `date_created` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- Inserting 2 rows into senders
-- Insert batch #1
INSERT INTO senders (id, project_id, message, name_button, url_button, image, `time`, date_created) VALUES
(1, 2, 'Хай', '', '', '', 1, '2022-02-22 18:34:23'),
(2, 3, 'привет', '', '', '', 1, '2024-02-05 09:35:40');

-- END TABLE senders

-- BEGIN TABLE templates
CREATE TABLE `templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `project_id` int(11) NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL,
  `del_time` varchar(50) NOT NULL,
  `date_edit` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

-- Inserting 2 rows into templates
-- Insert batch #1
INSERT INTO templates (id, project_id, name, del_time, date_edit) VALUES
(1, 2, 'dfdf', '', '2022-02-22 16:14:21'),
(2, 3, 'rtretret', '0', '2024-02-05 09:33:36');

-- END TABLE templates

-- BEGIN TABLE users
CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bot_id` bigint(60) NOT NULL DEFAULT '0',
  `chat_id` bigint(60) NOT NULL DEFAULT '0',
  `date_join` varchar(50) NOT NULL,
  `step` int(1) NOT NULL DEFAULT '0',
  `captcha` varchar(255) NOT NULL,
  `msg_stop` int(1) NOT NULL DEFAULT '0',
  `status` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

-- Inserting 4 rows into users
-- Insert batch #1
INSERT INTO users (id, bot_id, chat_id, date_join, step, captcha, msg_stop, status) VALUES
(5, 2, 1604374113, '2022-02-22 18:55:12', 0, '0', 1, 1),
(7, 10, 5450434722, '2024-02-05 09:32:45', 0, '0', 1, 1),
(8, 10, 5237877655, '2024-02-05 09:45:13', 0, '0', 1, 1),
(9, 10, 5251549767, '2024-02-05 09:55:55', 0, '0', 1, 1);

-- END TABLE users

-- BEGIN TABLE users_site
CREATE TABLE `users_site` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tg_id` bigint(20) NOT NULL,
  `login` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `is_admin` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

-- Inserting 1 row into users_site
-- Insert batch #1
INSERT INTO users_site (id, tg_id, login, password, is_admin) VALUES
(1, 0, 'adm', '2215a706b14b2640ef8895d849fefc4dq6ERAHvYhq', 1);

-- END TABLE users_site

