/*M!999999\- enable the sandbox mode */ 
-- MariaDB dump 10.19  Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64)
--
-- Host: 127.0.0.1    Database: app_38474
-- ------------------------------------------------------
-- Server version	10.11.14-MariaDB-0+deb12u2

/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `branches`
--

DROP TABLE IF EXISTS `branches`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `branches` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `city` varchar(100) NOT NULL,
  `address` varchar(255) DEFAULT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `hours` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `branches`
--

LOCK TABLES `branches` WRITE;
/*!40000 ALTER TABLE `branches` DISABLE KEYS */;
INSERT INTO `branches` VALUES
(1,'Kabul Main','Kabul','Shar-e-Naw, Kabul','+93 700 111 222','08:00 AM - 06:00 PM'),
(2,'Herat Branch','Herat','Main Road, Herat','+93 700 333 444','08:30 AM - 05:30 PM'),
(3,'Mazar Center','Mazar-i-Sharif','Balkh Street, Mazar','+93 700 555 666','08:00 AM - 05:00 PM'),
(4,'Kandahar Hub','Kandahar','Airport Road, Kandahar','+93 700 777 888','09:00 AM - 04:00 PM');
/*!40000 ALTER TABLE `branches` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cars`
--

DROP TABLE IF EXISTS `cars`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `cars` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vin` varchar(50) NOT NULL,
  `brand` varchar(100) NOT NULL,
  `model` varchar(100) NOT NULL,
  `year` int(11) NOT NULL,
  `price` decimal(15,2) NOT NULL,
  `mileage` int(11) NOT NULL,
  `transmission` varchar(50) DEFAULT NULL,
  `fuel_type` varchar(50) DEFAULT NULL,
  `status` enum('Available','Reserved','Sold') DEFAULT 'Available',
  `branch_id` int(11) DEFAULT NULL,
  `is_featured` tinyint(1) DEFAULT 0,
  `image_url` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `vin` (`vin`),
  KEY `branch_id` (`branch_id`),
  CONSTRAINT `cars_ibfk_1` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cars`
--

LOCK TABLES `cars` WRITE;
/*!40000 ALTER TABLE `cars` DISABLE KEYS */;
INSERT INTO `cars` VALUES
(1,'VIN0000000001','Tesla','Model X',2023,66020.00,8568,'Automatic','Hybrid','Available',4,1,'assets/images/cars/car1.jpg','2026-02-16 17:44:23'),
(2,'VIN0000000002','BMW','X7',2020,114269.00,8462,'Automatic','Hybrid','Available',4,1,'assets/images/cars/car2.jpg','2026-02-16 17:44:23'),
(3,'VIN0000000003','Mercedes-Benz','E-Class',2022,176551.00,14978,'Automatic','Gasoline','Available',1,1,'assets/images/cars/car3.jpg','2026-02-16 17:44:23'),
(4,'VIN0000000004','Tesla','Model S',2021,129987.00,5263,'Automatic','Gasoline','Available',1,1,'assets/images/cars/car4.jpg','2026-02-16 17:44:23'),
(5,'VIN0000000005','BMW','X7',2020,71914.00,2277,'Automatic','Hybrid','Available',4,1,'assets/images/cars/car5.jpg','2026-02-16 17:44:23'),
(6,'VIN0000000006','Land Rover','Defender',2024,53857.00,13809,'Automatic','Hybrid','Available',2,1,'assets/images/cars/car6.jpg','2026-02-16 17:44:23'),
(7,'VIN0000000007','Lexus','RX 350',2020,50362.00,8212,'Automatic','Gasoline','Available',3,1,'assets/images/cars/car7.jpg','2026-02-16 17:44:23'),
(8,'VIN0000000008','Lexus','LX 600',2020,157026.00,192,'Automatic','Hybrid','Available',1,1,'assets/images/cars/car8.jpg','2026-02-16 17:44:23'),
(9,'VIN0000000009','Lexus','ES 350',2022,149865.00,8073,'Automatic','Hybrid','Available',4,0,'assets/images/cars/car9.jpg','2026-02-16 17:44:23'),
(10,'VIN0000000010','Lexus','LX 600',2022,136955.00,14064,'Automatic','Hybrid','Available',2,0,'assets/images/cars/car10.jpg','2026-02-16 17:44:23'),
(11,'VIN0000000011','Toyota','Land Cruiser',2021,116083.00,12545,'Automatic','Gasoline','Available',1,0,'assets/images/cars/car11.jpg','2026-02-16 17:44:23'),
(12,'VIN0000000012','Mercedes-Benz','S-Class',2023,177233.00,2170,'Automatic','Hybrid','Available',2,0,'assets/images/cars/car12.jpg','2026-02-16 17:44:23'),
(13,'VIN0000000013','BMW','X7',2022,176162.00,2440,'Automatic','Hybrid','Available',3,0,'assets/images/cars/car13.jpg','2026-02-16 17:44:23'),
(14,'VIN0000000014','Porsche','Cayenne',2020,113840.00,13614,'Automatic','Gasoline','Available',4,0,'assets/images/cars/car14.jpg','2026-02-16 17:44:23'),
(15,'VIN0000000015','Tesla','Model S',2021,53508.00,10674,'Automatic','Gasoline','Available',4,0,'assets/images/cars/car15.jpg','2026-02-16 17:44:23'),
(16,'VIN0000000016','BMW','7 Series',2020,108898.00,5346,'Automatic','Hybrid','Available',4,0,'assets/images/cars/car16.jpg','2026-02-16 17:44:23'),
(17,'VIN0000000017','Mercedes-Benz','S-Class',2020,56037.00,12766,'Automatic','Hybrid','Available',3,0,'assets/images/cars/car17.jpg','2026-02-16 17:44:23'),
(18,'VIN0000000018','Toyota','RAV4',2024,150289.00,8590,'Automatic','Hybrid','Available',1,0,'assets/images/cars/car18.jpg','2026-02-16 17:44:23'),
(19,'VIN0000000019','Land Rover','Defender',2021,73639.00,1603,'Automatic','Hybrid','Available',2,0,'assets/images/cars/car19.jpg','2026-02-16 17:44:23'),
(20,'VIN0000000020','Toyota','Camry',2021,76785.00,13561,'Automatic','Hybrid','Available',3,0,'assets/images/cars/car20.jpg','2026-02-16 17:44:23');
/*!40000 ALTER TABLE `cars` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `password` varchar(255) NOT NULL,
  `role` enum('Guest','Customer','Dealer','Employee','Manager','Admin','Super Admin') DEFAULT 'Customer',
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

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

LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES
(1,'admin','$2y$10$QCCJTMtWMNo4VDc5azbJ2evY2xFdNkuJKrJPgrzWMp55mH6bTv1we','Super Admin','2026-02-16 17:44:23');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2026-02-17  5:33:17
