--
-- Host: 127.0.0.1    Database: myfairlady_new
-- ------------------------------------------------------


--
-- Table structure for table `bill_items`
--

CREATE TABLE `bill_items` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `bill_id` bigint unsigned NOT NULL,
  `product_id` int unsigned NOT NULL,
  `product_description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `our_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `qty` int NOT NULL DEFAULT '1',
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `bill_items_bill_id_foreign` (`bill_id`),
  KEY `bill_items_product_id_foreign` (`product_id`),
  CONSTRAINT `bill_items_bill_id_foreign` FOREIGN KEY (`bill_id`) REFERENCES `bills` (`id`) ON DELETE CASCADE,
  CONSTRAINT `bill_items_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`product_id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bill_items`
--

INSERT INTO `bill_items` VALUES (2,2,1,'MFL00001 - N/A',250.00,210.00,1,210.00,'2025-07-18 01:01:01','2025-07-18 01:01:01'),(3,3,1,'MFL00001 - N/A',250.00,210.00,1,210.00,'2025-07-18 01:04:49','2025-07-18 01:04:49'),(4,4,2,'MFL00002 - N/A',250.00,200.00,1,200.00,'2025-07-18 01:07:12','2025-07-18 01:07:12'),(5,5,1,'MFL00001 - N/A',250.00,210.00,2,420.00,'2025-07-18 02:37:04','2025-07-18 02:37:04'),(6,5,2,'MFL00002 - N/A',250.00,200.00,1,200.00,'2025-07-18 02:37:04','2025-07-18 02:37:04'),(7,6,1,'MFL00001 - N/A',250.00,210.00,2,420.00,'2025-07-18 02:39:08','2025-07-18 02:39:08'),(8,7,1,'MFL00001 - N/A',250.00,210.00,2,420.00,'2025-07-18 03:55:01','2025-07-18 03:55:01'),(9,7,2,'MFL00002 - N/A',250.00,200.00,1,200.00,'2025-07-18 03:55:01','2025-07-18 03:55:01'),(10,8,1,'MFL00001 - N/A',250.00,210.00,1,210.00,'2025-07-18 03:56:47','2025-07-18 03:56:47'),(11,1,2,'MFL00002 - N/A',250.00,200.00,1,200.00,'2025-07-18 05:31:23','2025-07-18 05:31:23'),(17,9,1,'MFL00001 - N/A',250.00,210.00,1,210.00,'2025-07-18 05:46:50','2025-07-18 05:46:50'),(18,9,2,'MFL00002 - N/A',250.00,200.00,1,200.00,'2025-07-18 05:46:50','2025-07-18 05:46:50');

--
-- Table structure for table `bills`
--

CREATE TABLE `bills` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `bill_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `bill_date` date NOT NULL,
  `total_qty` int NOT NULL DEFAULT '0',
  `total_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `discount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tax_percentage` decimal(5,2) NOT NULL DEFAULT '0.00',
  `final_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `bills_bill_no_unique` (`bill_no`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bills`
--

INSERT INTO `bills` VALUES (1,'MFLBILL00001','2025-07-18',1,200.00,0.00,5.00,210.00,'2025-07-18 00:59:40','2025-07-18 05:31:23'),(2,'MFLBILL00002','2025-07-18',1,210.00,0.00,5.00,220.50,'2025-07-18 01:01:01','2025-07-18 01:01:01'),(3,'MFLBILL00003','2025-07-18',1,210.00,0.00,5.00,220.50,'2025-07-18 01:04:49','2025-07-18 01:04:49'),(4,'MFLBILL00004','2025-07-18',1,200.00,20.00,5.00,189.00,'2025-07-18 01:07:12','2025-07-18 01:07:12'),(5,'MFLBILL00005','2025-07-18',3,620.00,20.00,5.00,630.00,'2025-07-18 02:37:04','2025-07-18 02:37:04'),(6,'MFLBILL00006','2025-07-18',2,420.00,0.00,5.00,441.00,'2025-07-18 02:39:08','2025-07-18 02:39:08'),(7,'MFLBILL00007','2025-07-18',3,620.00,30.00,5.00,619.50,'2025-07-18 03:55:01','2025-07-18 03:55:01'),(8,'MFLBILL00008','2025-07-18',1,210.00,0.00,5.00,220.50,'2025-07-18 03:56:47','2025-07-18 03:56:47'),(9,'MFLBILL00009','2025-07-18',2,410.00,50.00,5.00,378.00,'2025-07-18 05:37:58','2025-07-18 05:46:50');

--
-- Table structure for table `brands`
--

CREATE TABLE `brands` (
  `brand_id` int unsigned NOT NULL AUTO_INCREMENT,
  `brand_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active_status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`brand_id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `brands`
--

INSERT INTO `brands` VALUES (1,'Max',1,'2025-07-17 04:15:56','2025-07-17 04:19:10'),(2,'Pepe Jeans',1,'2022-09-02 07:26:10','2022-09-06 12:49:23'),(3,'Prisma',1,'2022-09-02 07:26:10','2022-09-06 12:49:23'),(4,'Jack',1,'2022-09-02 07:26:10','2022-09-06 12:49:23'),(5,'Louis Philippe',1,'2022-09-02 07:26:15','2022-09-06 12:49:11'),(6,'Blackberrys',1,'2022-09-02 07:26:20','2022-09-06 12:48:56'),(7,'Arrow',1,'2022-09-02 07:26:25','2023-01-22 19:35:11'),(8,'Levi\'s',1,'2022-09-02 07:26:30','2022-09-06 12:48:38'),(9,'Nike',0,'2022-09-07 05:19:33','2022-10-13 18:35:07'),(10,'SONARI',1,'2024-11-29 14:02:49','2024-11-29 08:32:49'),(11,'TRYLO',1,'2024-11-29 14:02:59','2024-11-29 08:32:59'),(12,'RIZA',1,'2024-11-29 14:03:07','2024-11-29 08:33:07'),(13,'LOVABLE',1,'2024-11-29 14:07:14','2024-11-29 08:37:14'),(14,'ANGELFORM',1,'2024-11-29 14:07:21','2024-11-29 08:37:21');

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

CREATE TABLE `categories` (
  `category_id` int unsigned NOT NULL AUTO_INCREMENT,
  `category_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active_status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `categories` VALUES (1,'Bra',1,'2025-07-17 03:58:39','2025-07-18 03:52:26'),(2,'T-shirt',1,'2025-07-17 06:41:03','2025-07-17 06:41:03'),(3,'Panties',1,'2025-07-18 04:00:17','2025-07-18 04:00:17');

--
-- Table structure for table `colors`
--

CREATE TABLE `colors` (
  `color_id` int unsigned NOT NULL AUTO_INCREMENT,
  `color_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active_status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`color_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `colors`
--

INSERT INTO `colors` VALUES (1,'Red',1,'2025-07-17 04:23:42','2025-07-17 04:24:00');

--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `customer_id` int unsigned NOT NULL AUTO_INCREMENT,
  `customer_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mobile_number` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`customer_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `customers`
--


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

CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci 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;

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


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

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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


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

CREATE TABLE `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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


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

CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `migrations` VALUES (1,'0001_01_01_000001_create_cache_table',1),(2,'0001_01_01_000002_create_jobs_table',1),(3,'2023_01_01_000000_create_roles_table',2),(4,'2014_10_12_000000_create_users_table',3),(5,'2023_01_01_000001_create_categories_table',3),(6,'2023_01_01_000002_create_brands_table',3),(7,'2023_01_01_000003_create_colors_table',3),(8,'2023_01_01_000004_create_styles_table',3),(9,'2023_01_01_000005_create_sizes_table',3),(10,'2023_01_01_000006_create_products_table',3),(11,'2023_01_01_000007_create_bills_table',4),(12,'2023_01_01_000008_create_bill_items_table',4),(13,'2023_01_01_000009_create_customers_table',5);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `product_id` int unsigned NOT NULL AUTO_INCREMENT,
  `product_code` longtext COLLATE utf8mb4_unicode_ci,
  `category_id` int unsigned DEFAULT NULL,
  `brand_id` int unsigned DEFAULT NULL,
  `style_id` int unsigned DEFAULT NULL,
  `size_id` int unsigned DEFAULT NULL,
  `color_id` int unsigned DEFAULT NULL,
  `threshold` int NOT NULL DEFAULT '2',
  `product_quantity` int NOT NULL DEFAULT '0',
  `product_manual_quantity` int NOT NULL DEFAULT '0',
  `product_mrp` decimal(10,2) NOT NULL DEFAULT '0.00',
  `product_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `active_status` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`product_id`),
  KEY `products_category_id_foreign` (`category_id`),
  KEY `products_brand_id_foreign` (`brand_id`),
  KEY `products_style_id_foreign` (`style_id`),
  KEY `products_size_id_foreign` (`size_id`),
  KEY `products_color_id_foreign` (`color_id`),
  CONSTRAINT `products_brand_id_foreign` FOREIGN KEY (`brand_id`) REFERENCES `brands` (`brand_id`) ON DELETE SET NULL,
  CONSTRAINT `products_category_id_foreign` FOREIGN KEY (`category_id`) REFERENCES `categories` (`category_id`) ON DELETE SET NULL,
  CONSTRAINT `products_color_id_foreign` FOREIGN KEY (`color_id`) REFERENCES `colors` (`color_id`) ON DELETE SET NULL,
  CONSTRAINT `products_size_id_foreign` FOREIGN KEY (`size_id`) REFERENCES `sizes` (`size_id`) ON DELETE SET NULL,
  CONSTRAINT `products_style_id_foreign` FOREIGN KEY (`style_id`) REFERENCES `styles` (`style_id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` VALUES (1,'MFL00001',1,1,1,1,1,5,5,0,250.00,210.00,1,'2025-07-17 06:22:37','2025-07-18 05:46:50',NULL),(2,'MFL00002',2,1,1,1,1,2,6,0,250.00,200.00,1,'2025-07-17 07:24:26','2025-07-18 05:46:50',NULL),(3,'MFL00003',3,7,1,1,1,2,10,0,300.00,250.00,1,'2025-07-18 05:36:23','2025-07-18 05:39:51',NULL);

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

CREATE TABLE `roles` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `active_status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` VALUES (1,'Admin',1,NULL,NULL);

--
-- Table structure for table `sizes`
--

CREATE TABLE `sizes` (
  `size_id` int unsigned NOT NULL AUTO_INCREMENT,
  `size_name` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active_status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`size_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sizes`
--

INSERT INTO `sizes` VALUES (1,'44',1,'2025-07-17 04:49:51','2025-07-17 04:50:11');

--
-- Table structure for table `styles`
--

CREATE TABLE `styles` (
  `style_id` int unsigned NOT NULL AUTO_INCREMENT,
  `style_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `active_status` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`style_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `styles`
--

INSERT INTO `styles` VALUES (1,'Cap sleeves',1,'2025-07-17 04:31:11','2025-07-17 04:31:31'),(2,'Tesy',1,'2025-07-17 06:41:29','2025-07-17 06:41:29');


