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

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

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

