-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Mar 12, 2026 at 06:40 PM
-- Server version: 8.0.33-cll-lve
-- PHP Version: 8.1.16

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: `diginspire_found`
--

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

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

CREATE TABLE `admins` (
  `id` int NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `admins` (`id`, `username`, `password`) VALUES
(1, 'admin', 'admin');

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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int NOT NULL,
  `name` varchar(100) NOT NULL,
  `icon` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `sort` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `name`, `icon`, `sort`) VALUES
(1, 'Keys', './category/1.png', 6),
(2, 'Electronics', './category/2.png', 10),
(3, 'Wallets', './category/3.png', 5),
(4, 'Jewelry', './category/4.png', 9),
(5, 'Bags', './category/5.png', 7),
(6, 'Pets', './category/6.png', 4),
(7, 'Eyeglasses', './category/7.png', 12),
(8, 'Other', './category/8.png', 14),
(9, 'Kid', './category/9.png', 1),
(10, 'Cars', './category/10.png', 2),
(11, 'Bike', './category/11.png', 3),
(12, 'Cycle', './category/12.png', 13),
(13, 'Documents', './category/13.png', 8);

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

--
-- Table structure for table `enquiries`
--

CREATE TABLE `enquiries` (
  `id` int NOT NULL,
  `listing_id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `item_details` text NOT NULL,
  `enquiry_id` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `response` varchar(50) NOT NULL DEFAULT 'no'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `enquiries`
--

INSERT INTO `enquiries` (`id`, `listing_id`, `name`, `phone`, `item_details`, `enquiry_id`, `created_at`, `response`) VALUES
(1, 5, 'Vaibhav', '8221841086', 'Test', 'ENQ-68c1186975fd2', '2025-09-10 06:19:21', 'no'),
(2, 5, 'Nikunj Gajera', '+918866775339', 'Isme adhar card me xyz he', 'ENQ-68c1194e537fd', '2025-09-10 06:23:10', 'no'),
(3, 5, 'Vaibhav', '8221841086', 'Test', 'ENQ-68c11a7f0b578', '2025-09-10 06:28:15', 'no'),
(4, 5, 'Vaibhav', '8221841086', 'Test', 'ENQ-68c11a9ec4fdd', '2025-09-10 06:28:46', 'no'),
(5, 5, 'Vaibhav', '8221841086', 'Test', 'ENQ-68c11ac64236b', '2025-09-10 06:29:26', 'no'),
(6, 5, 'Vaibhav', '8221841086', 'Test', 'ENQ-68c11ac8844a4', '2025-09-10 06:29:28', 'no'),
(7, 5, 'Nikunj Gajera', '+918866775339', 'Xyz product ki side', 'ENQ-68c124a78d718', '2025-09-10 07:11:35', 'yes');

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

--
-- Table structure for table `lost_found`
--

CREATE TABLE `lost_found` (
  `id` int NOT NULL,
  `lost_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `title` varchar(255) NOT NULL,
  `location` varchar(255) NOT NULL,
  `type` enum('Lost','Found') NOT NULL,
  `description` text,
  `images` text,
  `poster_name` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `category` int DEFAULT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `lost_found`
--

INSERT INTO `lost_found` (`id`, `lost_date`, `title`, `location`, `type`, `description`, `images`, `poster_name`, `email`, `phone`, `created_at`, `category`, `status`) VALUES
(1, '2025-08-30 00:00:00', 'Hello', 'Rohtak', 'Lost', 'Hello', '[\"https://images.pexels.com/photos/28683174/pexels-photo-28683174/free-photo-of-happy-labrador-retriever-portrait-in-tunisia.jpeg?auto=compress&cs=tinysrgb&dpr=1&w=500\",\"https://www.haakaa.co.nz/cdn/shop/articles/25a8814a2f4466f6777af3f2be2bcb9f_500x.jpg?v=1632199588\"]', 'Vaibhav', 'info@diginspire.co', '918221841086', '2025-08-30 08:34:26', 1, 1),
(2, '2025-08-30 15:10:32', 'Test', 'Delhi, India', 'Lost', 'Hello', '[\"./uploads/68b2c70e46818-image0.png\"]', 'Vaibhav', 'info@diginspire.co', '918221841086', '2025-08-30 09:40:32', 5, 1),
(4, '2025-09-10 09:40:16', 'sfdsfsdf', 'sdfsfsfsf', 'Found', 'sdfsdfsd', '[\"./uploads/68c0fa2820213-image0.png\"]', 'sdfsdf', 'admin@example.com', '918221841086', '2025-09-10 04:10:16', 5, 1),
(5, '2025-09-10 10:15:04', 'N', 'B', 'Found', 'U', '[\".\\/uploads\\/68c1024fb90a8-image0.png\",\".\\/uploads\\/68c1024fcc904-image1.png\"]', 'Nikunj Gajera', 'nikunjgajera11@gmail.com', '+918866775339', '2025-09-10 04:45:04', 7, 1),
(6, '2025-09-13 10:38:36', 'Test', 'Rohtak, Haryana, India', 'Found', 'Test', '[\".\\/uploads\\/68c4fc5418f99-image0.png\"]', 'Vaibhav', 'info@abcd.com', '8221841086', '2025-09-13 05:08:36', 11, 1),
(7, '2025-09-13 11:11:58', 'Website', 'Rohtak, Haryana, India', 'Found', 'Hello', '[\".\\/uploads\\/68c50426a7c4b-image0.png\"]', 'Vaibhav', 'info@abcd.com', '7206941086', '2025-09-13 05:41:58', 11, 1);

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

--
-- Table structure for table `reports`
--

CREATE TABLE `reports` (
  `id` int NOT NULL,
  `ad_id` int NOT NULL,
  `message` text NOT NULL,
  `created_at` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `reports`
--

INSERT INTO `reports` (`id`, `ad_id`, `message`, `created_at`) VALUES
(1, 1, 'sdfsfd', '2025-08-30 14:46:45'),
(2, 6, 'ss', '2025-09-13 14:39:35');

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

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

CREATE TABLE `users` (
  `id` int NOT NULL,
  `mobile` varchar(15) NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `latitude` varchar(20) DEFAULT NULL,
  `longitude` varchar(20) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `region` varchar(100) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `mobile`, `name`, `ip_address`, `latitude`, `longitude`, `city`, `region`, `country`, `created_at`) VALUES
(1, '8221841086', 'Vaibhav', '45.115.176.9', '28.9145', '76.5292', 'Rohtak', 'Haryana', 'India', '2025-09-13 05:38:26'),
(2, '7206941086', 'Vaibhav', '45.115.176.9', '28.8964', '76.5909', 'Rohtak', 'Haryana', 'India', '2025-09-13 05:41:58'),
(3, '8866775339', 'Nikunj Gajera', '152.58.37.31', '21.1981', '72.8298', 'Surat', 'Gujarat', 'India', '2025-09-13 05:46:20');

--
-- Indexes for dumped tables
--

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

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

--
-- Indexes for table `enquiries`
--
ALTER TABLE `enquiries`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `enquiry_id` (`enquiry_id`),
  ADD KEY `listing_id` (`listing_id`);

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

--
-- Indexes for table `reports`
--
ALTER TABLE `reports`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ad_id` (`ad_id`);

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `admins`
--
ALTER TABLE `admins`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `enquiries`
--
ALTER TABLE `enquiries`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `lost_found`
--
ALTER TABLE `lost_found`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `reports`
--
ALTER TABLE `reports`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `enquiries`
--
ALTER TABLE `enquiries`
  ADD CONSTRAINT `enquiries_ibfk_1` FOREIGN KEY (`listing_id`) REFERENCES `lost_found` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `reports`
--
ALTER TABLE `reports`
  ADD CONSTRAINT `reports_ibfk_1` FOREIGN KEY (`ad_id`) REFERENCES `lost_found` (`id`);
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 */;
