-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `togbuzz`
--

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

--
-- Table structure for table `admins`
--

CREATE TABLE `admins` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `mobile` varchar(255) DEFAULT NULL,
  `designation` varchar(255) DEFAULT NULL,
  `company` varchar(255) DEFAULT NULL,
  `user_type` varchar(100) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `test_access_key` varchar(255) DEFAULT NULL,
  `test_secret_key` varchar(255) DEFAULT NULL,
  `test_token` varchar(255) DEFAULT NULL,
  `live_access_key` varchar(255) DEFAULT NULL,
  `live_secret_key` varchar(255) DEFAULT NULL,
  `live_token` varchar(255) DEFAULT NULL,
  `is_live` int(11) NOT NULL DEFAULT 0,
  `status` int(11) NOT NULL DEFAULT 0,
  `role` int(11) NOT NULL DEFAULT 1,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `admins`
--

INSERT INTO `admins` (`id`, `name`, `email`, `mobile`, `designation`, `company`, `user_type`, `image`, `password`, `password_hash`, `test_access_key`, `test_secret_key`, `test_token`, `live_access_key`, `live_secret_key`, `live_token`, `is_live`, `status`, `role`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Akash Sharma', 'admin@gmail.com', '8005502822', 'Manager', NULL, 'admin', 'images/1701865864.jpg', '123456', '$2y$10$7Yx23SBjiBuQnHCi/zLKr.dVkrdiYYNV/WBJHFqsOJz1S6iGRykaC', '', '', '', NULL, NULL, NULL, 0, 1, 0, NULL, NULL, '2023-12-06 07:01:04'),
(2, 'QA', 'admiaan@gmail.com', '7247808361', 'Software Developer', NULL, NULL, NULL, 'msYA81p3j', '$2y$12$/7w6ShVQNTFmox6mi4N2mO1wVzB0On6tpfFLj1URGocWwQHiAFnC2', NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 1, NULL, NULL, '2023-12-06 06:03:26');

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

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int(11) NOT NULL,
  `name` varchar(200) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL,
  `subAdminView` varchar(11) NOT NULL DEFAULT 'off',
  `subAdminAdd` varchar(11) NOT NULL DEFAULT 'off',
  `subAdminEdit` varchar(11) NOT NULL DEFAULT 'off',
  `newsView` varchar(11) NOT NULL DEFAULT 'off',
  `newsAdd` varchar(11) NOT NULL DEFAULT 'off',
  `newsEdit` varchar(11) NOT NULL DEFAULT 'off',
  `blogView` varchar(11) NOT NULL DEFAULT 'off',
  `blogAdd` varchar(11) NOT NULL DEFAULT 'off',
  `blogEdit` varchar(11) NOT NULL DEFAULT 'off',
  `userView` varchar(200) NOT NULL DEFAULT 'off'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `created_at`, `updated_at`, `subAdminView`, `subAdminAdd`, `subAdminEdit`, `newsView`, `newsAdd`, `newsEdit`, `blogView`, `blogAdd`, `blogEdit`, `userView`) VALUES
(1, 'Analytics', '2023-12-06 05:54:34', '2023-12-06 06:32:17', 'off', 'on', 'off', 'on', 'on', 'off', 'on', 'off', 'on', 'off'),
(2, 'Super', '2024-03-09 05:24:23', NULL, 'on', 'on', 'on', 'on', 'on', 'on', 'on', 'on', 'on', 'on');

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

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `favicon` varchar(255) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `title`, `favicon`, `logo`, `created_at`, `updated_at`) VALUES
(1, 'TogBuzzz', 'images/1680596594.png', 'images/1680596594.png', NULL, '2024-03-09 00:22:56');

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

--
-- Table structure for table `tempusers`
--

CREATE TABLE `tempusers` (
  `id` int(11) NOT NULL,
  `name` varchar(200) NOT NULL,
  `mobile` varchar(200) NOT NULL,
  `dl` varchar(20) NOT NULL,
  `aadhar` varchar(20) NOT NULL,
  `otp` varchar(6) NOT NULL,
  `status` int(11) NOT NULL DEFAULT 1 COMMENT '1 pending, 2 Not verify 3 Verify',
  `otp_limit` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tempusers`
--

INSERT INTO `tempusers` (`id`, `name`, `mobile`, `dl`, `aadhar`, `otp`, `status`, `otp_limit`, `created_at`, `updated_at`) VALUES
(1, 'Akash Sharma', '9785438367', 'DFHFHY5454586768', '485454545454', '270378', 1, 0, '2024-03-27 07:53:07', '2024-03-28 06:05:04'),
(2, 'Akash Sharma', '8005502822', 'ASKDGAJSDJKASHDH', '987545784548', '318907', 1, 0, '2024-03-28 04:51:03', '2024-03-28 05:07:43');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `name` varchar(200) NOT NULL,
  `mobile` varchar(200) NOT NULL,
  `dl` varchar(200) NOT NULL,
  `token` varchar(200) NOT NULL,
  `mobile_verify` int(11) NOT NULL DEFAULT 1,
  `aadhar_no` varchar(200) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `admins`
--
ALTER TABLE `admins`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `admins_email_unique` (`email`);

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admins`
--
ALTER TABLE `admins`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

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

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

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

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

