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

START TRANSACTION;



--
-- Database: `cutommystgngs_checkers`
--

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

--
-- Table structure for table `faq`
--

CREATE TABLE `faq` (
  `id` int(11) NOT NULL,
  `question` varchar(255) NOT NULL,
  `ans` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `inquiry`
--

CREATE TABLE `inquiry` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `number` varchar(255) NOT NULL,
  `msg` text NOT NULL,
  `updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

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

--
-- Table structure for table `match_rooms`
--

CREATE TABLE `match_rooms` (
  `id` bigint(20) NOT NULL,
  `user_one` int(11) NOT NULL,
  `user_two` int(11) DEFAULT NULL,
  `spectator_ids` varchar(255) DEFAULT NULL,
  `room_code` varchar(255) DEFAULT NULL,
  `code_status` tinyint(4) DEFAULT NULL COMMENT '0 = unused , 1 = used',
  `room_status` tinyint(4) DEFAULT NULL COMMENT '0 = inactive , 1 = active',
  `winner_id` int(11) DEFAULT NULL,
  `status` int(11) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `match_rooms`
--

INSERT INTO `match_rooms` (`id`, `user_one`, `user_two`, `spectator_ids`, `room_code`, `code_status`, `room_status`, `winner_id`, `status`, `created_at`, `updated_at`) VALUES
(15, 2, 3, NULL, 'jJSNmDiO', 1, 0, 3, 1, '2023-07-07 15:16:59', '2023-07-07 22:33:59'),
(16, 2, NULL, NULL, '71S35eWz', NULL, 1, NULL, 1, '2023-07-10 19:04:23', '2023-07-10 19:04:23');

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

--
-- Table structure for table `website`
--

CREATE TABLE `website` (
  `location` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `twitter` varchar(255) DEFAULT NULL,
  `linkedin` varchar(255) DEFAULT NULL,
  `instagram` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `website`
--

INSERT INTO `website` (`location`, `email`, `phone`, `twitter`, `linkedin`, `instagram`, `created_at`, `updated_at`) VALUES
('2005 Stokes Isle Apt. 896, Venaville 10010, USA', 'info@yourdomain.com', '(+68) 120034509', 'https://twitter.com/', 'https://linkedin.com/', 'https://instagram.com/', '2023-05-20 06:35:37', '2023-05-20 06:35:37');

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `match_rooms`
--
ALTER TABLE `match_rooms`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_one_id` (`user_one`),
  ADD KEY `user_two_id` (`user_two`),
  ADD KEY `winner_id` (`winner_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

--
-- AUTO_INCREMENT for table `match_rooms`
--
ALTER TABLE `match_rooms`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `match_rooms`
--
ALTER TABLE `match_rooms`
  ADD CONSTRAINT `user_one_id` FOREIGN KEY (`user_one`) REFERENCES `users` (`id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `user_two_id` FOREIGN KEY (`user_two`) REFERENCES `users` (`id`) ON DELETE NO ACTION,
  ADD CONSTRAINT `winner_id` FOREIGN KEY (`winner_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION;
COMMIT;

