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

START TRANSACTION;



--
-- Database: `security_round`
--

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

--
-- Table structure for table `checkpoints`
--

CREATE TABLE `checkpoints` (
  `id` int(11) NOT NULL,
  `name` varchar(100) DEFAULT NULL,
  `qr_token` char(36) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `location` varchar(255) NOT NULL DEFAULT '',
  `unit_id` int(11) DEFAULT NULL,
  `latitude` decimal(10,7) NOT NULL DEFAULT 0.0000000,
  `longitude` decimal(10,7) NOT NULL DEFAULT 0.0000000
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `checkpoints`
--

INSERT INTO `checkpoints` (`id`, `name`, `qr_token`, `created_at`, `location`, `unit_id`, `latitude`, `longitude`) VALUES
(1, 'Emergency Assembly Point Patrolling', 'CHKPT-004', '2025-12-18 06:18:33', 'Emergency Assembly Point Patrolling', 4, 30.6696755, 76.8422970),
(2, 'Scrap Yard Patrolling', 'CHKPT-012', '2025-12-18 06:18:33', 'Scrap Yard Patrolling( eng i)', 4, 30.6700311, 76.8426093),
(3, 'Pump House Patrolling', 'CHKPT-009', '2025-12-18 06:18:33', 'Pump House Patrolling', 4, 30.6696000, 76.8427000),
(4, 'Back Emergency Door Patrolling', '6174e2bc-dbd9-11f0-96b0-14cb19cf4a52', '2025-12-18 06:18:33', 'Back Emergency Door Patrolling', 4, 0.0000000, 0.0000000),
(5, 'Main Gate Patrolling', 'CHKPT-011', '2025-12-18 06:18:33', 'Main Gate Patrolling (supply chain)', 4, 30.6697456, 76.8422648),
(6, 'Washroom Area Patrolling', '617577a9-dbd9-11f0-96b0-14cb19cf4a52', '2025-12-18 06:18:33', 'Washroom Area Patrolling', 4, 0.0000000, 0.0000000),
(7, 'CPWD Office Patrolling', '61760ddd-dbd9-11f0-96b0-14cb19cf4a52', '2025-12-18 06:18:33', 'CPWD Office Patrolling', 4, 0.0000000, 0.0000000),
(8, 'Deisel Generator Area Patrolling', '61765f92-dbd9-11f0-96b0-14cb19cf4a52', '2025-12-18 06:18:33', 'Deisel Generator Area Patrolling', 4, 0.0000000, 0.0000000),
(9, 'Fire Water Tank Patrolling', '6176e07d-dbd9-11f0-96b0-14cb19cf4a52', '2025-12-18 06:18:33', 'Fire Water Tank Patrolling', 4, 0.0000000, 0.0000000),
(10, 'Annapurna Cooking Area Patrolling', '6177331f-dbd9-11f0-96b0-14cb19cf4a52', '2025-12-18 06:18:33', 'Annapurna Cooking Area Patrolling', 4, 0.0000000, 0.0000000),
(11, 'LPG Bank Patrolling', 'lpb-chek', '2026-01-06 05:45:05', 'LPG Bank Patrolling', 4, 0.0000000, 0.0000000),
(12, 'Inner Loby Patrolling', 'loby-chk', '2026-01-06 05:46:18', 'Inner Loby Patrolling', 4, 0.0000000, 0.0000000),
(13, 'Dock 1 Exit Patrolling', 'dock-chk', '2026-01-06 05:48:09', 'Dock 1 Exit Patrolling', 4, 0.0000000, 0.0000000),
(14, 'Meter Room Patrolling', 'meter-chk', '2026-01-06 05:48:57', 'Meter Room Patrolling', 4, 0.0000000, 0.0000000);

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

--
-- Table structure for table `guard_visits`
--

CREATE TABLE `guard_visits` (
  `id` bigint(20) NOT NULL,
  `user_id` int(11) NOT NULL,
  `checkpoint_id` int(11) NOT NULL,
  `photo` longblob DEFAULT NULL,
  `latitude` decimal(10,7) DEFAULT NULL,
  `longitude` decimal(10,7) DEFAULT NULL,
  `submitted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `user_agent` varchar(255) DEFAULT NULL,
  `ip_address` varbinary(16) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `guard_visits`
--

INSERT INTO `guard_visits` (`id`, `user_id`, `checkpoint_id`, `photo`, `latitude`, `longitude`, `submitted_at`, `user_agent`, `ip_address`) VALUES
(1, 1, 1, 0x[encoded data, 112460 characters], 30.6701215, 76.8428652, '2025-12-18 06:19:29', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', 0x00000000000000000000000000000001);
INSERT INTO `guard_visits` (`id`, `user_id`, `checkpoint_id`, `photo`, `latitude`, `longitude`, `submitted_at`, `user_agent`, `ip_address`) VALUES
(2, 1, 5, 0x[encoded data, 113966 characters], 30.6701251, 76.8428704, '2025-12-18 06:21:08', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', 0x00000000000000000000000000000001);
INSERT INTO `guard_visits` (`id`, `user_id`, `checkpoint_id`, `photo`, `latitude`, `longitude`, `submitted_at`, `user_agent`, `ip_address`) VALUES
(3, 1, 1, 0x[encoded data, 62284 characters], 30.6701251, 76.8428704, '2025-12-18 06:21:21', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', 0x00000000000000000000000000000001);
INSERT INTO `guard_visits` (`id`, `user_id`, `checkpoint_id`, `photo`, `latitude`, `longitude`, `submitted_at`, `user_agent`, `ip_address`) VALUES
(4, 1, 3, 0x[encoded data, 15034 characters], 30.6701243, 76.8428689, '2025-12-18 06:21:31', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', 0x00000000000000000000000000000001);
INSERT INTO `guard_visits` (`id`, `user_id`, `checkpoint_id`, `photo`, `latitude`, `longitude`, `submitted_at`, `user_agent`, `ip_address`) VALUES
(5, 3, 5, 0x[encoded data, 60356 characters], 30.6701322, 76.8429827, '2025-12-18 07:15:21', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', 0x00000000000000000000000000000001);
INSERT INTO `guard_visits` (`id`, `user_id`, `checkpoint_id`, `photo`, `latitude`, `longitude`, `submitted_at`, `user_agent`, `ip_address`) VALUES
(6, 3, 5, 0x[encoded data, 92078 characters], 30.6701322, 76.8429827, '2025-12-18 07:15:29', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36', 0x00000000000000000000000000000001);
