-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 03, 2025 at 09:13 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
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: `flipkart`
--

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

--
-- Table structure for table `admin_status`
--

CREATE TABLE `admin_status` (
  `id` int(11) NOT NULL,
  `status` enum('online','offline') NOT NULL DEFAULT 'online'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admin_status`
--

INSERT INTO `admin_status` (`id`, `status`) VALUES
(1, 'online');

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

--
-- Table structure for table `agents`
--

CREATE TABLE `agents` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `agents`
--

INSERT INTO `agents` (`id`, `name`) VALUES
(1, 'Agent 1'),
(2, 'Agent 2'),
(3, 'Agent 3');

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

--
-- Table structure for table `chat_messages`
--

CREATE TABLE `chat_messages` (
  `id` int(11) NOT NULL,
  `user_type` enum('user','admin') NOT NULL,
  `message` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `user_name` varchar(100) DEFAULT NULL,
  `user_number` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `chat_messages`
--

INSERT INTO `chat_messages` (`id`, `user_type`, `message`, `created_at`, `user_name`, `user_number`) VALUES
(1, 'user', 'hy', '2025-10-02 08:41:06', NULL, NULL),
(2, 'admin', 'hello', '2025-10-02 08:41:41', NULL, NULL),
(27, 'admin', 'Abhi sabhi agent busy hai, wait kijiye jaldi reply milega.', '2025-10-02 12:03:32', 'System', '0'),
(29, 'admin', 'Abhi sabhi agent busy hai, wait kijiye jaldi reply milega.', '2025-10-02 12:38:06', 'System', '0'),
(57, 'user', 'hy', '2025-10-02 14:05:23', 'urvashi', '4564564564'),
(59, 'user', 'jgjcfjgcfjcf', '2025-10-02 14:11:05', 'umesdf', '1111234567'),
(63, 'user', 'kkkkkkkkk', '2025-10-02 14:34:03', 'vinaykuka', '4567896655353'),
(64, 'admin', 'hy', '2025-10-02 14:39:59', '(Agent 1)', '4567896655353'),
(65, 'admin', 'hy', '2025-10-02 14:40:06', '(Agent 1)', '1111234567'),
(66, 'admin', 'hyyyy', '2025-10-02 14:40:17', '(Agent 1)', '4564564564'),
(67, 'admin', 'hy', '2025-10-02 14:41:46', '(Agent 1)', '4567896655353'),
(68, 'admin', 'hy', '2025-10-02 14:42:24', '(Agent 1)', '4564564564'),
(69, 'user', 'hyyyy', '2025-10-02 14:42:40', 'vinaykuka', '4567896655353'),
(70, 'admin', 'hy', '2025-10-02 14:42:49', '(Agent 1)', '4567896655353'),
(71, 'user', 'hy', '2025-10-02 14:45:43', 'vinaykuka', '4567896655353'),
(72, 'admin', 'hy', '2025-10-02 14:45:53', '(Agent 1)', '4567896655353'),
(73, 'user', 'fdsfgzsfgzsfg', '2025-10-02 14:46:31', 'vinaykuka', '4567896655353'),
(74, 'user', 'hy', '2025-10-03 07:09:45', 'urvashi', '452541'),
(75, 'admin', 'Abhi sabhi agent busy hai, wait kijiye jaldi reply milega.', '2025-10-03 07:09:45', 'System', '452541'),
(76, 'admin', 'hy', '2025-10-03 07:10:35', '(Agent 1)', '4567896655353'),
(77, 'user', 'hy', '2025-10-03 07:10:49', 'urvashi', '452541'),
(78, 'admin', 'Abhi sabhi agent busy hai, wait kijiye jaldi reply milega.', '2025-10-03 07:10:49', 'System', '452541'),
(79, 'user', 'hy', '2025-10-03 07:11:09', 'urvashi', '452541'),
(80, 'admin', 'Abhi sabhi agent busy hai, wait kijiye jaldi reply milega.', '2025-10-03 07:11:09', 'System', '452541'),
(81, 'user', 'hy', '2025-10-03 07:11:21', 'urvashi', '452541');

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

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

CREATE TABLE `messages` (
  `id` int(11) NOT NULL,
  `user_name` varchar(50) NOT NULL,
  `sender` varchar(50) NOT NULL,
  `message` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admin_status`
--
ALTER TABLE `admin_status`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `agents`
--
ALTER TABLE `agents`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `chat_messages`
--
ALTER TABLE `chat_messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82;

--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!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 */;
