-- phpMyAdmin SQL Dump
-- version 4.4.15.10
-- https://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Apr 11, 2019 at 10:30 AM
-- Server version: 5.5.60-MariaDB
-- PHP Version: 7.2.16

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `airtel-bot`
--

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

--
-- Table structure for table `allowed_plans`
--

CREATE TABLE IF NOT EXISTS `allowed_plans` (
  `id` int(11) NOT NULL,
  `who` varchar(200) NOT NULL,
  `plan` varchar(111) NOT NULL,
  `price` varchar(255) NOT NULL,
  `pack_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `api_history`
--

CREATE TABLE IF NOT EXISTS `api_history` (
  `id` int(11) NOT NULL,
  `msisdn` varchar(255) NOT NULL,
  `query` text NOT NULL,
  `response` text NOT NULL,
  `date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `api_issue`
--

CREATE TABLE IF NOT EXISTS `api_issue` (
  `id` int(11) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `msisdn` varchar(255) NOT NULL,
  `issue` varchar(255) NOT NULL,
  `plan` varchar(255) DEFAULT NULL,
  `price` varchar(255) DEFAULT NULL,
  `date_time` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `buttons`
--

CREATE TABLE IF NOT EXISTS `buttons` (
  `id` int(11) NOT NULL,
  `mapping` varchar(255) NOT NULL,
  `btn_type` varchar(255) NOT NULL,
  `url_or_title` longtext NOT NULL,
  `title_or_payload` longtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `carousels`
--

CREATE TABLE IF NOT EXISTS `carousels` (
  `id` int(11) NOT NULL,
  `mapping` varchar(255) NOT NULL,
  `title` longtext NOT NULL,
  `subtitle` longtext NOT NULL,
  `image_url` longtext NOT NULL,
  `buttons` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `customer`
--

CREATE TABLE IF NOT EXISTS `customer` (
  `id` int(11) NOT NULL,
  `name` varchar(255) CHARACTER SET utf8 NOT NULL,
  `phone` varchar(255) CHARACTER SET utf8 NOT NULL,
  `location` varchar(255) CHARACTER SET utf8 NOT NULL,
  `start_date` varchar(255) NOT NULL,
  `start_time` varchar(255) NOT NULL,
  `last_date` varchar(255) NOT NULL,
  `last_time` varchar(255) NOT NULL,
  `survey` longtext CHARACTER SET utf8,
  `status` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `data_purchase`
--

CREATE TABLE IF NOT EXISTS `data_purchase` (
  `id` int(11) NOT NULL,
  `msisdn` varchar(255) NOT NULL,
  `plan` varchar(255) NOT NULL,
  `price` varchar(255) NOT NULL,
  `status` varchar(255) DEFAULT NULL,
  `date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `diff_bang_eng`
--

CREATE TABLE IF NOT EXISTS `diff_bang_eng` (
  `id` int(11) NOT NULL,
  `keywords` longtext CHARACTER SET utf8 NOT NULL
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `diff_bang_eng`
--

INSERT INTO `diff_bang_eng` (`id`, `keywords`) VALUES
(1, 'complaints, disturb,Ovijog,bichar, bebohar,Chakri, cakri, Job circular,sarcular,');

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

--
-- Table structure for table `messages`
--

CREATE TABLE IF NOT EXISTS `messages` (
  `id` int(11) NOT NULL,
  `user` varchar(255) NOT NULL,
  `query` text NOT NULL,
  `response` longtext NOT NULL,
  `date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `otp_responses`
--

CREATE TABLE IF NOT EXISTS `otp_responses` (
  `id` int(11) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `msisdn` varchar(255) NOT NULL,
  `query` varchar(255) NOT NULL,
  `message_id` varchar(255) NOT NULL,
  `otp_code` varchar(255) NOT NULL,
  `validity` varchar(255) NOT NULL,
  `issue_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `query_response`
--

CREATE TABLE IF NOT EXISTS `query_response` (
  `id` int(11) NOT NULL,
  `greet_en` varchar(255) NOT NULL,
  `greet_bn` varchar(255) NOT NULL,
  `intent` varchar(255) NOT NULL,
  `param_en` longtext NOT NULL,
  `keywords` text,
  `reply_text_en` longtext NOT NULL,
  `reply_text_bn` longtext NOT NULL,
  `button_text_en` text,
  `button_text_bn` text,
  `carousels` varchar(255) NOT NULL,
  `buttons` longtext NOT NULL,
  `quick_replies` longtext NOT NULL
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `query_response`
--

INSERT INTO `query_response` (`id`, `greet_en`, `greet_bn`, `intent`, `param_en`, `keywords`, `reply_text_en`, `reply_text_bn`, `button_text_en`, `button_text_bn`, `carousels`, `buttons`, `quick_replies`) VALUES
(1, '', '', '', 'Sexual harassment', 'Complaints,disturb,rape,eve teasing, complaints, disturb,আপনার অভিযোগটি যথাযথ কর্তৃপক্ষের কাছে পাঠানো হয়েছে। ', 'The relevant authority has been notified about your complaint.\r\n', 'আপনার অভিযোগটি যথাযথ কর্তৃপক্ষের কাছে পাঠানো হয়েছে। ', NULL, NULL, '', '', ''),
(2, '', '', '', 'General complaint', 'Complaints, charge, accusation, criticism, problem,Ovijog,bichar, bebohar,অভিযোগ', 'Thanks for reaching us out. \r\nWe will forward your message to the respective authority.', 'আমাদেরকে জানানোর জন্য ধন্যবাদ। আপনার ইমেলটি যথাযথ কর্তৃপক্ষের কাছে পাঠিয়ে দেয়া হয়েছে। অনুগ্রহ করে অপেক্ষা করুন।', NULL, NULL, '', '', ''),
(3, '', '', '', 'Job', 'Job,vacancies,চাকরি,চাকরী,চাক্রি, Chakri, cakri, Job circular,sarcular,', 'Please check this link for available job vacancies: http://careers.brac.net/Presentation/Landing.aspx ', 'অনুগ্রহ করে এই লিংকে ক্লিক করুন: http://careers.brac.net/Presentation/Landing.aspx ', NULL, NULL, '', '', '');

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

--
-- Table structure for table `quick_replies`
--

CREATE TABLE IF NOT EXISTS `quick_replies` (
  `id` int(11) NOT NULL,
  `mapping` varchar(255) NOT NULL,
  `btn_type` varchar(255) NOT NULL,
  `url_or_title` longtext NOT NULL,
  `title_or_payload` longtext NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `save_payment`
--

CREATE TABLE IF NOT EXISTS `save_payment` (
  `id` int(11) NOT NULL,
  `status` longtext NOT NULL,
  `amount` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `mobile` varchar(255) NOT NULL,
  `category` varchar(255) NOT NULL,
  `invoice` longtext NOT NULL,
  `date` varchar(255) NOT NULL,
  `time` varchar(255) NOT NULL,
  `timestamp` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `user_chatting_raw`
--

CREATE TABLE IF NOT EXISTS `user_chatting_raw` (
  `id` int(11) NOT NULL,
  `user` varchar(255) NOT NULL,
  `query` longtext NOT NULL,
  `response` longtext NOT NULL,
  `dateTime` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `allowed_plans`
--
ALTER TABLE `allowed_plans`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `api_history`
--
ALTER TABLE `api_history`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `api_issue`
--
ALTER TABLE `api_issue`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `buttons`
--
ALTER TABLE `buttons`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `carousels`
--
ALTER TABLE `carousels`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `customer`
--
ALTER TABLE `customer`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `phone` (`phone`);

--
-- Indexes for table `data_purchase`
--
ALTER TABLE `data_purchase`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `diff_bang_eng`
--
ALTER TABLE `diff_bang_eng`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `query_response`
--
ALTER TABLE `query_response`
  ADD PRIMARY KEY (`id`),
  ADD FULLTEXT KEY `keywords` (`keywords`);
ALTER TABLE `query_response`
  ADD FULLTEXT KEY `keywords_2` (`keywords`);
ALTER TABLE `query_response`
  ADD FULLTEXT KEY `keywords_3` (`keywords`);
ALTER TABLE `query_response`
  ADD FULLTEXT KEY `keywords_4` (`keywords`);
ALTER TABLE `query_response`
  ADD FULLTEXT KEY `keywords_5` (`keywords`);
ALTER TABLE `query_response`
  ADD FULLTEXT KEY `keywords_6` (`keywords`);

--
-- Indexes for table `quick_replies`
--
ALTER TABLE `quick_replies`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `buttons`
--
ALTER TABLE `buttons`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `carousels`
--
ALTER TABLE `carousels`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `diff_bang_eng`
--
ALTER TABLE `diff_bang_eng`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `query_response`
--
ALTER TABLE `query_response`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `quick_replies`
--
ALTER TABLE `quick_replies`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
