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

START TRANSACTION;



--
-- Database: `nbcs`
--

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

--
-- Table structure for table `companies`
--

CREATE TABLE `companies` (
  `id` int(11) NOT NULL,
  `name` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `companies`
--

INSERT INTO `companies` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Softrobo', '2023-12-04 04:47:45', '2023-12-04 04:47:45'),
(3, 'Florence Fox', '2023-12-04 04:58:14', '2023-12-04 04:58:14');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `locations`
--

CREATE TABLE `locations` (
  `id` int(11) NOT NULL,
  `location` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(5, '2014_10_12_000000_create_users_table', 1),
(6, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(7, '2019_08_19_000000_create_failed_jobs_table', 1),
(8, '2019_12_14_000001_create_personal_access_tokens_table', 1);

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

--
-- Table structure for table `offenders`
--

CREATE TABLE `offenders` (
  `id` int(11) NOT NULL,
  `sirn` text DEFAULT NULL,
  `userid` bigint(20) UNSIGNED NOT NULL,
  `incident_date` date DEFAULT NULL,
  `incident_time` time DEFAULT NULL,
  `incident_location` text DEFAULT NULL,
  `happened` text DEFAULT NULL,
  `offenders` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `offenders`
--

INSERT INTO `offenders` (`id`, `sirn`, `userid`, `incident_date`, `incident_time`, `incident_location`, `happened`, `offenders`, `created_at`, `updated_at`) VALUES
(14, '5812', 4, '2023-12-03', '16:19:00', 'lahore pakistan', 'Theft', 3, '2023-12-04 05:19:50', '2023-12-04 05:19:50'),
(15, '2341', 4, '2023-12-01', '17:32:00', 'lahore pakistan', 'Theft', 4, '2023-12-04 05:32:51', '2023-12-04 05:32:51');

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

--
-- Table structure for table `offenders_attachments`
--

CREATE TABLE `offenders_attachments` (
  `id` int(11) NOT NULL,
  `offenders_id` int(11) NOT NULL,
  `offenders_detail_id` int(11) NOT NULL,
  `attachment` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `offenders_attachments`
--

INSERT INTO `offenders_attachments` (`id`, `offenders_id`, `offenders_detail_id`, `attachment`, `created_at`, `updated_at`) VALUES
(19, 14, 19, '1701685518any1.jpg', '2023-12-04 05:25:18', '2023-12-04 05:25:18'),
(20, 15, 21, '1701685971any.jpg', '2023-12-04 05:32:51', '2023-12-04 05:32:51'),
(21, 15, 23, '1701686012any1.jpg', '2023-12-04 05:33:32', '2023-12-04 05:33:32');

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

--
-- Table structure for table `offenders_detail`
--

CREATE TABLE `offenders_detail` (
  `id` int(11) NOT NULL,
  `offenders_id` int(11) NOT NULL,
  `gender` text DEFAULT NULL,
  `body` text DEFAULT NULL,
  `height` text DEFAULT NULL,
  `appearance` text DEFAULT NULL,
  `behaviours` text DEFAULT NULL,
  `method_of_offence` text DEFAULT NULL,
  `person_of_intrest` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `offenders_detail`
--

INSERT INTO `offenders_detail` (`id`, `offenders_id`, `gender`, `body`, `height`, `appearance`, `behaviours`, `method_of_offence`, `person_of_intrest`, `created_at`, `updated_at`) VALUES
(18, 14, 'Male', 'Thin', 'Short 1.60m (5.3)', 'a:3:{i:0;s:5:\"Scars\";i:1;s:7:\"Tattoos\";i:2;s:9:\"Piercings\";}', 'Physically abusive', 'a:3:{i:0;s:19:\"Initial observation\";i:1;s:11:\"Concealment\";i:2;s:6:\"Others\";}', 'N/A - not applicable', '2023-12-04 05:19:50', '2023-12-04 05:19:50'),
(19, 14, 'Female', 'Muscular', 'Average 1.60-1.75m (5.3 - 5.9)', 'a:3:{i:0;s:5:\"Scars\";i:1;s:7:\"Tattoos\";i:2;s:9:\"Piercings\";}', 'Erratic', 'a:4:{i:0;s:5:\"Entry\";i:1;s:17:\"Product selection\";i:2;s:13:\"When approach\";i:3;s:6:\"Others\";}', 'N/A - not applicable', '2023-12-04 05:25:18', '2023-12-04 05:25:18'),
(20, 14, 'Male', 'Thin', 'Short 1.60m (5.3)', 'a:4:{i:0;s:5:\"Scars\";i:1;s:9:\"Piercings\";i:2;s:4:\"Head\";i:3;s:3:\"Bag\";}', 'Aggressive', 'a:2:{i:0;s:5:\"Entry\";i:1;s:19:\"Initial observation\";}', 'We prevented them from offending', '2023-12-04 05:25:40', '2023-12-04 05:25:40'),
(21, 15, 'Male', 'Thin', 'Short 1.60m (5.3)', 'a:1:{i:0;s:5:\"Scars\";}', 'Aggressive', 'a:1:{i:0;s:5:\"Entry\";}', 'They were apprehended', '2023-12-04 05:32:51', '2023-12-04 05:32:51'),
(22, 15, 'Female', 'Average', 'Average 1.60-1.75m (5.3 - 5.9)', 'a:2:{i:0;s:7:\"Tattoos\";i:1;s:9:\"Piercings\";}', 'Physically abusive', 'a:2:{i:0;s:19:\"Initial observation\";i:1;s:17:\"Product selection\";}', 'We prevented them from offending', '2023-12-04 05:33:13', '2023-12-04 05:33:13'),
(23, 15, 'Male', 'Thin', 'Short 1.60m (5.3)', 'a:2:{i:0;s:4:\"Head\";i:1;s:8:\"Clothing\";}', 'Carried weopons', 'a:3:{i:0;s:17:\"Product selection\";i:1;s:11:\"Concealment\";i:2;s:12:\"Surveillance\";}', 'They left without paying for the goods', '2023-12-04 05:33:32', '2023-12-04 05:33:32'),
(24, 15, 'Unknown', 'Overweight', 'Unknown', 'a:4:{i:0;s:4:\"Head\";i:1;s:8:\"Clothing\";i:2;s:3:\"Bag\";i:3;s:5:\"Other\";}', 'Erratic', 'a:4:{i:0;s:12:\"Distractions\";i:1;s:13:\"When approach\";i:2;s:4:\"Exit\";i:3;s:6:\"Others\";}', 'They left but the goods were recovered', '2023-12-04 05:34:14', '2023-12-04 05:34:14');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

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

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

--
-- Indexes for table `offenders`
--
ALTER TABLE `offenders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userid` (`userid`);

--
-- Indexes for table `offenders_attachments`
--
ALTER TABLE `offenders_attachments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `offenders_id` (`offenders_id`),
  ADD KEY `offenders_detail_id` (`offenders_detail_id`);

--
-- Indexes for table `offenders_detail`
--
ALTER TABLE `offenders_detail`
  ADD PRIMARY KEY (`id`),
  ADD KEY `offenders_id` (`offenders_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `offenders`
--
ALTER TABLE `offenders`
  ADD CONSTRAINT `offenders_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `offenders_attachments`
--
ALTER TABLE `offenders_attachments`
  ADD CONSTRAINT `offenders_attachments_ibfk_1` FOREIGN KEY (`offenders_id`) REFERENCES `offenders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `offenders_attachments_ibfk_2` FOREIGN KEY (`offenders_detail_id`) REFERENCES `offenders_detail` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `offenders_detail`
--
ALTER TABLE `offenders_detail`
  ADD CONSTRAINT `offenders_detail_ibfk_1` FOREIGN KEY (`offenders_id`) REFERENCES `offenders` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;

