/*M!999999\- enable the sandbox mode */ 
-- MariaDB dump 10.19  Distrib 10.11.19-MariaDB, for Linux (x86_64)
--
-- Host: localhost    Database: excels_malik
-- ------------------------------------------------------
-- Server version	10.11.19-MariaDB

/*!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 */;

--
-- Current Database: `excels_malik`
--


--
-- Table structure for table `account_transactions`
--

DROP TABLE IF EXISTS `account_transactions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `account_transactions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `account_id` bigint(20) unsigned NOT NULL,
  `transaction_type` varchar(255) NOT NULL,
  `reference_id` bigint(20) unsigned DEFAULT NULL,
  `amount` decimal(15,2) NOT NULL,
  `opening_balance` decimal(15,2) NOT NULL,
  `closing_balance` decimal(15,2) NOT NULL,
  `currency_type` varchar(10) NOT NULL,
  `created_by` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `account_transactions_account_id_foreign` (`account_id`),
  KEY `account_transactions_created_by_foreign` (`created_by`),
  CONSTRAINT `account_transactions_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `bank_cash_accounts` (`id`) ON DELETE CASCADE,
  CONSTRAINT `account_transactions_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `account_transactions`
--

LOCK TABLES `account_transactions` WRITE;
/*!40000 ALTER TABLE `account_transactions` DISABLE KEYS */;
INSERT INTO `account_transactions` (`id`, `account_id`, `transaction_type`, `reference_id`, `amount`, `opening_balance`, `closing_balance`, `currency_type`, `created_by`, `created_at`, `updated_at`) VALUES (14,3,'Repair',17,1000.00,2000000.00,1999000.00,'ZAR',1,'2025-07-18 11:30:40','2025-07-18 11:30:40'),
(15,3,'Tip',NULL,1000.00,3000000.00,2999000.00,'ZAR',1,'2025-07-18 11:37:06','2025-07-18 11:37:06'),
(17,3,'Testing',15,233.25,2999000.00,2998766.75,'ZAR',1,'2025-07-19 08:48:30','2025-07-19 08:48:30'),
(20,2,'exp. for oil',19,45000.00,2100000.00,2055000.00,'PKR',1,'2025-07-21 09:21:10','2025-07-21 09:21:10'),
(21,4,'salary to Mr. Ali',NULL,10000.00,20000.00,10000.00,'PKR',1,'2025-07-21 11:09:47','2025-07-21 11:09:47');
/*!40000 ALTER TABLE `account_transactions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `bank_cash_accounts`
--

DROP TABLE IF EXISTS `bank_cash_accounts`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `bank_cash_accounts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `type` enum('bank','cash') NOT NULL,
  `title` varchar(255) NOT NULL,
  `country_id` bigint(20) unsigned NOT NULL,
  `currency_type` varchar(255) NOT NULL,
  `yard` varchar(255) DEFAULT NULL,
  `opening_balance` decimal(15,2) NOT NULL DEFAULT 0.00,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `bank_cash_accounts_country_id_foreign` (`country_id`),
  KEY `bank_cash_accounts_type_index` (`type`),
  CONSTRAINT `bank_cash_accounts_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `bank_cash_accounts`
--

LOCK TABLES `bank_cash_accounts` WRITE;
/*!40000 ALTER TABLE `bank_cash_accounts` DISABLE KEYS */;
INSERT INTO `bank_cash_accounts` (`id`, `type`, `title`, `country_id`, `currency_type`, `yard`, `opening_balance`, `status`, `created_at`, `updated_at`) VALUES (1,'bank','UBL',3,'PKR','Gulberg',2410000.00,'active','2025-07-09 01:50:24','2025-07-09 01:53:21'),
(2,'cash','Petty Cash',3,'PKR','Gulberg',2055000.00,'active','2025-07-09 02:18:14','2025-07-21 09:21:10'),
(3,'bank','NBD Bank',4,'ZAR',NULL,1631382.75,'active','2025-07-10 08:36:37','2025-07-19 10:45:52'),
(4,'bank','MCB Bank',3,'PKR',NULL,10000.00,'active','2025-07-10 09:41:26','2025-07-21 11:09:47'),
(5,'cash','Asad (Daily Cash)',3,'PKR',NULL,200000.00,'active','2025-07-21 11:17:14','2025-07-21 11:17:14'),
(6,'cash','Advance Received from clients',3,'PKR',NULL,0.00,'active','2025-07-21 11:38:43','2025-07-21 11:38:43');
/*!40000 ALTER TABLE `bank_cash_accounts` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cache`
--

DROP TABLE IF EXISTS `cache`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cache`
--

LOCK TABLES `cache` WRITE;
/*!40000 ALTER TABLE `cache` DISABLE KEYS */;
/*!40000 ALTER TABLE `cache` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cache_locks`
--

DROP TABLE IF EXISTS `cache_locks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cache_locks`
--

LOCK TABLES `cache_locks` WRITE;
/*!40000 ALTER TABLE `cache_locks` DISABLE KEYS */;
/*!40000 ALTER TABLE `cache_locks` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `car_expenses`
--

DROP TABLE IF EXISTS `car_expenses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `car_expenses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `car_profile_id` bigint(20) unsigned NOT NULL,
  `account_id` bigint(20) unsigned DEFAULT NULL,
  `stock_number` varchar(255) NOT NULL,
  `expenses_for` varchar(255) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `currency` varchar(10) NOT NULL,
  `usd_amount` decimal(10,2) DEFAULT NULL,
  `created_by` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `car_expenses_stock_number_index` (`stock_number`),
  KEY `car_expenses_created_at_index` (`created_at`),
  KEY `car_expenses_created_by_index` (`created_by`),
  KEY `car_expenses_deleted_at_index` (`deleted_at`),
  KEY `car_expenses_car_profile_id_foreign` (`car_profile_id`),
  KEY `car_expenses_account_id_foreign` (`account_id`),
  CONSTRAINT `car_expenses_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `bank_cash_accounts` (`id`) ON DELETE SET NULL,
  CONSTRAINT `car_expenses_car_profile_id_foreign` FOREIGN KEY (`car_profile_id`) REFERENCES `car_profiles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `car_expenses_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `car_expenses`
--

LOCK TABLES `car_expenses` WRITE;
/*!40000 ALTER TABLE `car_expenses` DISABLE KEYS */;
INSERT INTO `car_expenses` (`id`, `car_profile_id`, `account_id`, `stock_number`, `expenses_for`, `amount`, `currency`, `usd_amount`, `created_by`, `created_at`, `updated_at`, `deleted_at`) VALUES (10,19,NULL,'Malik-auto#0019','CARRIER',3300.00,'ZAR',182.92,1,'2025-06-23 12:40:55','2025-06-23 12:40:55',NULL),
(11,18,NULL,'Malik-auto#0018','test for PKR 2000',2000.00,'PKR',7.05,1,'2025-06-24 04:06:11','2025-06-24 04:06:11',NULL),
(12,17,NULL,'Malik-auto#0017','test for adding exp.',1200.00,'PKR',4.23,1,'2025-06-25 04:30:51','2025-06-25 04:30:51',NULL),
(14,15,NULL,'Malik-auto#0015','Bank UBL',20000.00,'PKR',70.42,4,'2025-07-10 09:52:32','2025-07-10 09:52:32',NULL),
(15,16,NULL,'Malik-auto#0016','fuel',1200.00,'PKR',4.14,1,'2025-07-16 12:10:43','2025-07-16 12:10:43',NULL),
(17,15,3,'Malik-auto#0015','Testing',233.25,'ZAR',12.93,1,'2025-07-19 08:48:30','2025-07-19 08:48:30',NULL),
(18,19,2,'Malik-auto#0019','exp. for oil',45000.00,'PKR',155.17,1,'2025-07-21 09:21:10','2025-07-21 09:21:10',NULL);
/*!40000 ALTER TABLE `car_expenses` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `car_profiles`
--

DROP TABLE IF EXISTS `car_profiles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `car_profiles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `rec_no` varchar(255) NOT NULL,
  `located_yard` varchar(255) DEFAULT NULL,
  `grade` varchar(255) DEFAULT NULL,
  `seats` int(11) DEFAULT NULL,
  `chassis` varchar(255) DEFAULT NULL,
  `shift` varchar(255) DEFAULT NULL,
  `mileage` int(11) DEFAULT NULL,
  `engine_cc` int(11) DEFAULT NULL,
  `dimension` varchar(255) DEFAULT NULL,
  `m3` decimal(8,2) DEFAULT NULL,
  `price` decimal(12,2) DEFAULT NULL,
  `sale_price` decimal(10,2) DEFAULT NULL,
  `suggested_sold_price` decimal(10,2) DEFAULT NULL,
  `sold_price` decimal(10,2) DEFAULT NULL,
  `sold_status` enum('pending','approved','rejected') NOT NULL DEFAULT 'pending',
  `admin_approved_at` timestamp NULL DEFAULT NULL,
  `fuel` varchar(255) DEFAULT NULL,
  `max_loading` decimal(8,2) DEFAULT NULL,
  `country_id` int(11) NOT NULL,
  `assigned_manager_id` bigint(20) unsigned DEFAULT NULL,
  `car_status` enum('new_arrival','in_transit','ready_for_sale','sold','under_maintenance','pending_sold') NOT NULL DEFAULT 'new_arrival',
  `transit_expense` decimal(10,2) DEFAULT NULL,
  `transit_expense_in_usd` decimal(15,2) DEFAULT NULL,
  `currency_type` varchar(10) DEFAULT NULL,
  `account_id` bigint(20) unsigned DEFAULT NULL,
  `car_image` varchar(255) DEFAULT NULL,
  `car_video` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `car_profiles_rec_no_unique` (`rec_no`),
  KEY `car_profiles_assigned_manager_id_foreign` (`assigned_manager_id`),
  KEY `car_profiles_account_id_foreign` (`account_id`),
  CONSTRAINT `car_profiles_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `bank_cash_accounts` (`id`) ON DELETE SET NULL,
  CONSTRAINT `car_profiles_assigned_manager_id_foreign` FOREIGN KEY (`assigned_manager_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `car_profiles`
--

LOCK TABLES `car_profiles` WRITE;
/*!40000 ALTER TABLE `car_profiles` DISABLE KEYS */;
INSERT INTO `car_profiles` (`id`, `rec_no`, `located_yard`, `grade`, `seats`, `chassis`, `shift`, `mileage`, `engine_cc`, `dimension`, `m3`, `price`, `sale_price`, `suggested_sold_price`, `sold_price`, `sold_status`, `admin_approved_at`, `fuel`, `max_loading`, `country_id`, `assigned_manager_id`, `car_status`, `transit_expense`, `transit_expense_in_usd`, `currency_type`, `account_id`, `car_image`, `car_video`, `created_at`, `updated_at`) VALUES (15,'Malik-auto#0015','Japan','3.5',5,'Gk3-1320851','At',115000,1300,'4',4.00,2263.00,12300.00,NULL,12250.00,'approved','2025-07-10 10:13:31','Gs',4.00,3,4,'sold',20000.00,68.96,'PKR',NULL,'car_images/G4SZ6PUGE5yPr6oKVgSdFwiqp6sAozb8BqMmUjXF.jpg',NULL,'2025-06-23 12:09:04','2025-07-10 10:13:31'),
(16,'Malik-auto#0016','Yokohama','3',29,'Hzb50-0011312','MT',120000,4200,'7',6.00,9296.00,NULL,NULL,NULL,'pending',NULL,'DsL',29.00,3,4,'under_maintenance',12000.00,41.37,'PKR',NULL,'car_images/RR1iYwqMNoZACmoxgniIqR2Mx15UdPXoFF6aoqKd.jpg',NULL,'2025-06-23 12:12:54','2025-07-14 09:35:21'),
(17,'Malik-auto#0017','Fukuoka','R',5,'He12-059364','At',247000,1200,'4',4.00,1313.00,1515.00,30000.00,NULL,'rejected',NULL,'Ds',1200.00,3,4,'ready_for_sale',34000.00,117.24,'PKR',NULL,'car_images/IZO0cWiVVyoThb2Rul2i1XOeq8JpINjZZz3gOsoV.jpg',NULL,'2025-06-23 12:16:03','2025-07-09 03:46:01'),
(18,'Malik-auto#0018','Fukuoka','3',10,'Kdh200-0073177','At',298000,2500,'4.7',6.00,4132.00,NULL,NULL,NULL,'approved','2025-07-10 08:17:42','DsL',1200.00,4,7,'sold',18000.00,997.78,'ZAR',NULL,'car_images/9U2k6LYMxprASIMIria5fK7U6vKTuL7ewYtVZFSQ.jpg',NULL,'2025-06-23 12:20:10','2025-07-10 08:17:42'),
(19,'Malik-auto#0019','Fukuoka','3',5,'Nhp10-6494761','At',188900,1500,'4',4.00,2413.00,3000.00,NULL,300000.00,'approved','2025-07-10 08:41:58','Gs',1200.00,4,7,'in_transit',22000.00,151.34,'JPY',3,'car_images/tvp7gqgfgUTYzF1QS2GTzgkkZlsRQu5Be4kPXEaj.jpg',NULL,'2025-06-23 12:22:20','2025-07-18 11:25:05');
/*!40000 ALTER TABLE `car_profiles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `countries`
--

DROP TABLE IF EXISTS `countries`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `countries` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `currency_rate` decimal(10,4) DEFAULT NULL,
  `currency_type` varchar(10) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `countries_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `countries`
--

LOCK TABLES `countries` WRITE;
/*!40000 ALTER TABLE `countries` DISABLE KEYS */;
INSERT INTO `countries` (`id`, `name`, `currency_rate`, `currency_type`, `created_at`, `updated_at`) VALUES (1,'Japan',145.3600,'JPY','2025-06-14 05:40:43','2025-06-28 11:38:10'),
(2,'UAE',3.6700,'AED','2025-06-14 05:40:43','2025-06-14 05:40:43'),
(3,'Pakistan',290.0000,'PKR','2025-06-14 05:40:43','2025-07-10 10:00:33'),
(4,'South Africa',18.0400,'ZAR','2025-06-14 05:40:43','2025-06-14 05:40:43');
/*!40000 ALTER TABLE `countries` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `failed_jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `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(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `failed_jobs`
--

LOCK TABLES `failed_jobs` WRITE;
/*!40000 ALTER TABLE `failed_jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `failed_jobs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `job_batches`
--

DROP TABLE IF EXISTS `job_batches`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `job_batches`
--

LOCK TABLES `job_batches` WRITE;
/*!40000 ALTER TABLE `job_batches` DISABLE KEYS */;
/*!40000 ALTER TABLE `job_batches` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `jobs`
--

DROP TABLE IF EXISTS `jobs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) unsigned NOT NULL,
  `reserved_at` int(10) unsigned DEFAULT NULL,
  `available_at` int(10) unsigned NOT NULL,
  `created_at` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `jobs`
--

LOCK TABLES `jobs` WRITE;
/*!40000 ALTER TABLE `jobs` DISABLE KEYS */;
/*!40000 ALTER TABLE `jobs` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `migrations`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`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 `migrations`
--

LOCK TABLES `migrations` WRITE;
/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES (1,'0001_01_01_000000_create_users_table',1),
(2,'0001_01_01_000001_create_cache_table',1),
(3,'0001_01_01_000002_create_jobs_table',1),
(5,'2025_06_12_082339_add_phone_to_users_table',2),
(6,'2025_06_12_101827_create_permission_tables',3),
(7,'2025_06_14_103218_create_countries_table',4),
(8,'2025_06_14_120955_create_car_profiles_table',5),
(9,'2025_06_16_121602_rename_country_to_country_id_in_car_profiles',6),
(11,'2025_06_16_122609_add_country_id_to_users_table',7),
(12,'2025_06_17_134540_add_car_status_to_car_profiles_table',8),
(13,'2025_06_17_134749_add_car_status_to_car_profiles_table',9),
(14,'2025_06_19_064820_add_assigned_manager_id_to_car_profiles_table',9),
(15,'2025_06_19_135159_add_currency_type_to_countries_table',10),
(16,'2025_06_20_053119_add_transit_expense_and_currency_type_to_car_profiles_table',11),
(17,'2025_06_20_064239_add_currency_rate_to_countries_table',12),
(18,'2025_06_20_071724_add_user_type_to_users_table',13),
(19,'2025_06_20_133922_create_car_expenses_table',14),
(20,'2025_06_21_073829_create_office_expenses_table',15);
/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `model_has_permissions`
--

DROP TABLE IF EXISTS `model_has_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) unsigned NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`),
  CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `model_has_permissions`
--

LOCK TABLES `model_has_permissions` WRITE;
/*!40000 ALTER TABLE `model_has_permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `model_has_permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `model_has_roles`
--

DROP TABLE IF EXISTS `model_has_roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) unsigned NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`),
  CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `model_has_roles`
--

LOCK TABLES `model_has_roles` WRITE;
/*!40000 ALTER TABLE `model_has_roles` DISABLE KEYS */;
INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES (1,'App\\Models\\User',1),
(2,'App\\Models\\User',4),
(2,'App\\Models\\User',7),
(2,'App\\Models\\User',8),
(2,'App\\Models\\User',9),
(3,'App\\Models\\User',5),
(3,'App\\Models\\User',6);
/*!40000 ALTER TABLE `model_has_roles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `office_expenses`
--

DROP TABLE IF EXISTS `office_expenses`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `office_expenses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `country_id` bigint(20) unsigned NOT NULL,
  `account_id` bigint(20) unsigned DEFAULT NULL,
  `yard` varchar(255) NOT NULL,
  `expense_name` varchar(255) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `usd_amount` decimal(10,2) DEFAULT NULL,
  `currency` varchar(255) NOT NULL,
  `created_by` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `office_expenses_country_id_foreign` (`country_id`),
  KEY `office_expenses_created_by_foreign` (`created_by`),
  KEY `office_expenses_account_id_foreign` (`account_id`),
  CONSTRAINT `office_expenses_account_id_foreign` FOREIGN KEY (`account_id`) REFERENCES `bank_cash_accounts` (`id`) ON DELETE SET NULL,
  CONSTRAINT `office_expenses_country_id_foreign` FOREIGN KEY (`country_id`) REFERENCES `countries` (`id`) ON DELETE CASCADE,
  CONSTRAINT `office_expenses_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `office_expenses`
--

LOCK TABLES `office_expenses` WRITE;
/*!40000 ALTER TABLE `office_expenses` DISABLE KEYS */;
INSERT INTO `office_expenses` (`id`, `country_id`, `account_id`, `yard`, `expense_name`, `amount`, `usd_amount`, `currency`, `created_by`, `created_at`, `updated_at`) VALUES (1,3,NULL,'Dha','Lunch Expense',1100.00,3.87,'PKR',1,'2025-06-21 06:32:03','2025-06-21 06:33:30'),
(2,2,NULL,'Yard','Lunch Expense',800.00,217.98,'AED',1,'2025-06-21 08:20:06','2025-06-21 08:20:32'),
(3,3,NULL,'Faisal town','Lunch Expense',1000.00,3.52,'PKR',1,'2025-06-21 09:33:27','2025-06-21 09:33:27'),
(4,3,NULL,'Gulberg','salary for abc',50000.00,176.05,'PKR',1,'2025-06-21 13:15:55','2025-06-21 13:15:55'),
(5,3,NULL,'Faisal town','coffee',600.00,2.11,'PKR',1,'2025-06-23 05:30:12','2025-06-23 05:30:12'),
(7,4,3,'Fukuoka','Tip',1000.00,55.43,'ZAR',1,'2025-07-19 03:40:55','2025-07-19 03:40:55'),
(8,3,3,'Yokohama','Testing',126085620.00,73384.15,'ZAR',1,'2025-07-19 09:23:14','2025-07-19 10:44:57'),
(9,3,2,'Japan','test',43534.00,2413.19,'PKR',1,'2025-07-19 10:45:52','2025-07-19 10:46:33'),
(10,3,4,'Fukuoka','salary to Mr. Ali',10000.00,34.48,'PKR',1,'2025-07-21 11:09:47','2025-07-21 11:09:47');
/*!40000 ALTER TABLE `office_expenses` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `password_reset_tokens`
--

DROP TABLE IF EXISTS `password_reset_tokens`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `password_reset_tokens`
--

LOCK TABLES `password_reset_tokens` WRITE;
/*!40000 ALTER TABLE `password_reset_tokens` DISABLE KEYS */;
/*!40000 ALTER TABLE `password_reset_tokens` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `permissions`
--

DROP TABLE IF EXISTS `permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `permissions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `permissions`
--

LOCK TABLES `permissions` WRITE;
/*!40000 ALTER TABLE `permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `role_has_permissions`
--

DROP TABLE IF EXISTS `role_has_permissions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) unsigned NOT NULL,
  `role_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `role_has_permissions_role_id_foreign` (`role_id`),
  CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `role_has_permissions`
--

LOCK TABLES `role_has_permissions` WRITE;
/*!40000 ALTER TABLE `role_has_permissions` DISABLE KEYS */;
/*!40000 ALTER TABLE `role_has_permissions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `roles`
--

DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `roles` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `roles`
--

LOCK TABLES `roles` WRITE;
/*!40000 ALTER TABLE `roles` DISABLE KEYS */;
INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES (1,'admin','web','2025-06-12 05:49:05','2025-06-12 05:49:05'),
(2,'manager','web','2025-06-12 05:49:05','2025-06-12 05:49:05'),
(3,'salesperson','web','2025-06-12 05:49:05','2025-06-12 05:49:05');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sessions`
--

DROP TABLE IF EXISTS `sessions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8mb4 */;
CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sessions`
--

LOCK TABLES `sessions` WRITE;
/*!40000 ALTER TABLE `sessions` DISABLE KEYS */;
INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES ('Jfgq32JbohdKrrTMq6Ws21WNLrpqcaFFroTD5dUY',1,'45.249.9.64','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36','YTo0OntzOjY6Il90b2tlbiI7czo0MDoiaTdoa0gza2N6ZW5YbWZCcFlmandoM0YzdFFUQWZRSnhvQWJqenFaRCI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTtzOjk6Il9wcmV2aW91cyI7YToxOntzOjM6InVybCI7czo0NDoiaHR0cHM6Ly94bHNlcnAuY29tL21hbGlrYXV0by9hZG1pbi9kYXNoYm9hcmQiO319',1753428167);
/*!40000 ALTER TABLE `sessions` 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` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `user_type` varchar(255) DEFAULT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `country_id` int(11) DEFAULT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=10 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` (`id`, `name`, `email`, `user_type`, `email_verified_at`, `password`, `phone`, `country_id`, `remember_token`, `created_at`, `updated_at`) VALUES (1,'Muhammad Ayaz','admin@webexcels.com','admin',NULL,'$2y$12$K7GzY8m42RyMPWKbAdLC6erIgq7jDhsbDMQ8Rv6SYMF1JRFIwSjDW','87654321',NULL,NULL,'2025-06-10 08:13:36','2025-06-10 08:13:36'),
(4,'Muhammad ShariQ','manager@webexcels.com','manager',NULL,'$2y$12$KfjKOdy0L.j6zejpsawiWuLmeRr/McVbmo4r.pf3xZXj8cC.qqWYG','23452345',3,NULL,'2025-06-12 06:22:28','2025-06-12 06:22:28'),
(5,'Salman','sales@webexcels.com','salesperson',NULL,'$2y$12$u1T4A9Xhne6Zc1PqTHyr/..sGccKot3821zDdl3Tgtr06/ky4.Pq.','43124321',3,NULL,'2025-06-12 06:22:28','2025-06-12 06:22:28'),
(7,'Maxwell','maxwell_manager@webexcels.com','manager',NULL,'$2y$12$KfjKOdy0L.j6zejpsawiWuLmeRr/McVbmo4r.pf3xZXj8cC.qqWYG','12345678',4,NULL,'2025-06-19 02:46:37','2025-06-19 02:46:37'),
(8,'Pakistan Manager','pkmanager@webexcels.com','manager',NULL,'$2y$12$KfjKOdy0L.j6zejpsawiWuLmeRr/McVbmo4r.pf3xZXj8cC.qqWYG','03450000000',3,NULL,'2025-06-21 11:12:37','2025-06-21 11:12:37'),
(9,'Ali Imran (SA)','SAmanager@webexcels.com','manager',NULL,'$2y$12$fPwbBxr3JIoZJ/D0NsuWpedgZjO5nK.LavO7tQa4PbyYYUvUDz9f2','888888888',4,NULL,'2025-07-21 10:57:05','2025-07-21 10:57:05');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'excels_malik'
--

--
-- Dumping routines for database 'excels_malik'
--
/*!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-09-27  3:29:12
