-- MySQL dump 10.13  Distrib 9.5.0, for macos15.4 (arm64)
--
-- Host: localhost    Database: reseller_tracker
-- ------------------------------------------------------
-- Server version	9.5.0

/*!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 */;
/*!50503 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 */;
SET @MYSQLDUMP_TEMP_LOG_BIN = @@SESSION.SQL_LOG_BIN;
SET @@SESSION.SQL_LOG_BIN= 0;

--
-- GTID state at the beginning of the backup 
--

SET @@GLOBAL.GTID_PURGED=/*!80000 '+'*/ '3c4f248e-bdfd-11f0-aa0e-13856464c8c0:1-2860';

--
-- Table structure for table `audit_log`
--

DROP TABLE IF EXISTS `audit_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `audit_log` (
  `id` int NOT NULL AUTO_INCREMENT,
  `created_at` datetime NOT NULL,
  `actor_user_id` int DEFAULT NULL,
  `actor_name` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entity_type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `entity_id` int NOT NULL,
  `action` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
  `summary` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `before_json` text COLLATE utf8mb4_unicode_ci,
  `after_json` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `audit_log`
--

LOCK TABLES `audit_log` WRITE;
/*!40000 ALTER TABLE `audit_log` DISABLE KEYS */;
INSERT INTO `audit_log` VALUES (1,'2026-01-06 11:23:47',1,'Pranav Menn','Customer',2,'CREATE','Customer created','{}','{\"company_name\": \"Test Customer\", \"status\": \"Active\"}'),(2,'2026-01-06 12:35:59',1,'Pranav Menn','Customer',3,'CREATE','Customer created','{}','{\"company_name\": \"G3 WORLDWIDE PRIVATE LIMITED\", \"status\": \"Active\"}'),(3,'2026-01-06 12:38:14',1,'Pranav Menn','Subscription',2,'CREATE','Subscription saved','{}','{\"plan\": \"Premium\", \"billing_cycle\": \"Monthly\", \"user_count\": 37, \"cost_per_user\": 360.0, \"vendor_cost_per_user\": 252.0, \"total_vendor_cost\": 9324.0, \"start_date\": \"2025-12-01\", \"next_renewal_date\": \"2025-12-31\", \"confirmation_status\": \"Pending\", \"status\": \"Active\", \"inactive_date\": null, \"prorata_enabled\": false, \"prorata_consumed\": false, \"desktime_account_name\": \"G3 WORLDWIDE PRIVATE LIMITED\"}'),(4,'2026-01-06 12:38:34',1,'Pranav Menn','Subscription',2,'UPDATE','Subscription saved','{\"plan\": \"Premium\", \"billing_cycle\": \"Monthly\", \"user_count\": 37, \"cost_per_user\": \"360.00\", \"vendor_cost_per_user\": \"252.00\", \"total_vendor_cost\": \"9324.00\", \"start_date\": \"2025-12-01\", \"next_renewal_date\": \"2025-12-31\", \"confirmation_status\": \"Pending\", \"status\": \"Active\", \"inactive_date\": null, \"prorata_enabled\": false, \"prorata_consumed\": false, \"desktime_account_name\": \"G3 WORLDWIDE PRIVATE LIMITED\"}','{\"plan\": \"Premium\", \"billing_cycle\": \"Monthly\", \"user_count\": 37, \"cost_per_user\": 360.0, \"vendor_cost_per_user\": 252.0, \"total_vendor_cost\": 9324.0, \"start_date\": \"2025-12-01\", \"next_renewal_date\": \"2025-12-31\", \"confirmation_status\": \"Confirmed\", \"status\": \"Active\", \"inactive_date\": null, \"prorata_enabled\": false, \"prorata_consumed\": false, \"desktime_account_name\": \"G3 WORLDWIDE PRIVATE LIMITED\"}'),(5,'2026-01-06 12:39:54',1,'Pranav Menn','Invoice',2,'UPDATE','Invoice updated','{\"jobcard_no\": null, \"description\": null, \"amount\": \"0.00\", \"vendor_payment\": \"0.00\", \"gst_applicable\": false, \"gst_rate\": \"18.00\", \"invoice_status\": \"Pending\", \"payment_status\": \"Pending\", \"invoice_date\": null, \"payment_received_date\": null, \"remarks\": null}','{\"jobcard_no\": \"91820\", \"description\": \"DeskTime Premium Monthly subscription for 37 users at Rs 360/user/month from 1st December 2025 to 31st December 2025\", \"amount\": 13320.0, \"vendor_payment\": 9324.0, \"gst_applicable\": true, \"gst_rate\": 18.0, \"invoice_status\": \"Pending\", \"payment_status\": \"Pending\", \"invoice_date\": \"2025-12-01\", \"payment_received_date\": null, \"remarks\": \"TEst Invoice\"}'),(6,'2026-01-06 12:40:25',1,'Pranav Menn','Invoice',2,'UPDATE','Invoice updated','{\"jobcard_no\": \"91820\", \"description\": \"DeskTime Premium Monthly subscription for 37 users at Rs 360/user/month from 1st December 2025 to 31st December 2025\", \"amount\": \"13320.00\", \"vendor_payment\": \"9324.00\", \"gst_applicable\": true, \"gst_rate\": \"18.00\", \"invoice_status\": \"Pending\", \"payment_status\": \"Pending\", \"invoice_date\": \"2025-12-01\", \"payment_received_date\": null, \"remarks\": \"TEst Invoice\"}','{\"jobcard_no\": \"91820\", \"description\": \"DeskTime Premium Monthly subscription for 37 users at Rs 360/user/month from 1st December 2025 to 31st December 2025\", \"amount\": 13320.0, \"vendor_payment\": 9324.0, \"gst_applicable\": true, \"gst_rate\": 18.0, \"invoice_status\": \"Sent\", \"payment_status\": \"Pending\", \"invoice_date\": \"2025-12-01\", \"payment_received_date\": null, \"remarks\": \"TEst Invoice\"}'),(7,'2026-01-06 12:41:00',1,'Pranav Menn','SubscriptionUserChange',1,'CREATE','User count changed (G3 WORLDWIDE PRIVATE LIMITED)','{\"user_count\": 37, \"cycle_base_user_count\": 37, \"total_vendor_cost\": 9324.0}','{\"user_count\": 39, \"delta_users\": 2, \"effective_date\": \"2025-12-15\", \"total_vendor_cost\": 9828.0, \"change_id\": 1}'),(8,'2026-01-06 12:45:38',1,'Pranav Menn','SubscriptionUserChange',2,'CREATE','User count changed (G3 WORLDWIDE PRIVATE LIMITED)','{\"user_count\": 39, \"cycle_base_user_count\": 37, \"total_vendor_cost\": 9828.0}','{\"user_count\": 38, \"delta_users\": -1, \"effective_date\": \"2026-01-01\", \"total_vendor_cost\": 9576.0, \"change_id\": 2}'),(9,'2026-01-06 12:48:29',1,'Pranav Menn','Invoice',3,'UPDATE','Invoice updated','{\"jobcard_no\": null, \"description\": null, \"amount\": \"0.00\", \"vendor_payment\": \"0.00\", \"gst_applicable\": false, \"gst_rate\": \"18.00\", \"invoice_status\": \"Pending\", \"payment_status\": \"Pending\", \"invoice_date\": null, \"payment_received_date\": null, \"remarks\": null}','{\"jobcard_no\": \"93400\", \"description\": \"DeskTime Premium Monthly subscription for 38 users at Rs 360/user/month from 1st January 2026 to 31st January 2026\", \"amount\": 14074.84, \"vendor_payment\": 9852.39, \"gst_applicable\": true, \"gst_rate\": 18.0, \"invoice_status\": \"Sent\", \"payment_status\": \"Pending\", \"invoice_date\": \"2026-01-01\", \"payment_received_date\": null, \"remarks\": null}'),(10,'2026-01-06 12:48:38',1,'Pranav Menn','Subscription',2,'UPDATE','Renewal confirmation changed (G3 WORLDWIDE PRIVATE LIMITED)','{\"confirmation_status\": \"Confirmed\"}','{\"confirmation_status\": \"Confirmed\"}'),(11,'2026-01-06 12:48:49',1,'Pranav Menn','Subscription',2,'UPDATE','Subscription saved','{\"plan\": \"Premium\", \"billing_cycle\": \"Monthly\", \"user_count\": 38, \"cost_per_user\": \"360.00\", \"vendor_cost_per_user\": \"252.00\", \"total_vendor_cost\": \"9576.00\", \"start_date\": \"2025-12-01\", \"next_renewal_date\": \"2025-12-31\", \"confirmation_status\": \"Confirmed\", \"status\": \"Active\", \"inactive_date\": null, \"prorata_enabled\": false, \"prorata_consumed\": false, \"desktime_account_name\": \"G3 WORLDWIDE PRIVATE LIMITED\"}','{\"plan\": \"Premium\", \"billing_cycle\": \"Monthly\", \"user_count\": 38, \"cost_per_user\": 360.0, \"vendor_cost_per_user\": 252.0, \"total_vendor_cost\": 9576.0, \"start_date\": \"2025-12-01\", \"next_renewal_date\": \"2025-12-31\", \"confirmation_status\": \"Confirmed\", \"status\": \"Active\", \"inactive_date\": null, \"prorata_enabled\": false, \"prorata_consumed\": false, \"desktime_account_name\": \"G3 WORLDWIDE PRIVATE LIMITED\"}'),(12,'2026-01-06 12:49:59',1,'Pranav Menn','Subscription',2,'UPDATE','Subscription saved','{\"plan\": \"Premium\", \"billing_cycle\": \"Monthly\", \"user_count\": 38, \"cost_per_user\": \"360.00\", \"vendor_cost_per_user\": \"252.00\", \"total_vendor_cost\": \"9576.00\", \"start_date\": \"2025-12-01\", \"next_renewal_date\": \"2025-12-31\", \"confirmation_status\": \"Confirmed\", \"status\": \"Active\", \"inactive_date\": null, \"prorata_enabled\": false, \"prorata_consumed\": false, \"desktime_account_name\": \"G3 WORLDWIDE PRIVATE LIMITED\"}','{\"plan\": \"Premium\", \"billing_cycle\": \"Monthly\", \"user_count\": 38, \"cost_per_user\": 360.0, \"vendor_cost_per_user\": 252.0, \"total_vendor_cost\": 9576.0, \"start_date\": \"2025-12-01\", \"next_renewal_date\": \"2025-12-31\", \"confirmation_status\": \"Confirmed\", \"status\": \"Active\", \"inactive_date\": null, \"prorata_enabled\": false, \"prorata_consumed\": false, \"desktime_account_name\": \"G3 WORLDWIDE PRIVATE LIMITED\"}');
/*!40000 ALTER TABLE `audit_log` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `customers`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customers` (
  `id` int NOT NULL AUTO_INCREMENT,
  `company_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `bde_name` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('Active','In-Active','Name Changed') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active',
  `contact_person` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_email` varchar(190) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `contact_phone` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email_to` text COLLATE utf8mb4_unicode_ci,
  `email_cc` text COLLATE utf8mb4_unicode_ci,
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `company_name` (`company_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 `customers`
--

LOCK TABLES `customers` WRITE;
/*!40000 ALTER TABLE `customers` DISABLE KEYS */;
INSERT INTO `customers` VALUES (1,'Pranav Tech Pvt Ltd','Manisha','Active','Pranav','pranav@g.com','8606800200','pranav@chlsoftech.com','pranav@chlworldwide.com','Test Customer','2026-01-06 13:36:50'),(2,'Test Customer','Manisha','Active','Test','test@g.com','9811009900',NULL,NULL,'test','2026-01-06 16:53:47'),(3,'G3 WORLDWIDE PRIVATE LIMITED','Manisha','Active','Ravi','admin@stealthmanage.com','7988641707','admin@stealthmanage.com,accounts6@stealthmanage.com',NULL,'Desktime Client','2026-01-06 18:05:59');
/*!40000 ALTER TABLE `customers` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `invoices`
--

DROP TABLE IF EXISTS `invoices`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `invoices` (
  `id` int NOT NULL AUTO_INCREMENT,
  `customer_id` int NOT NULL,
  `invoice_month` int NOT NULL,
  `invoice_year` int NOT NULL,
  `period_start` date DEFAULT NULL,
  `period_end` date DEFAULT NULL,
  `is_prorata` tinyint(1) NOT NULL DEFAULT '0',
  `jobcard_no` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `amount` decimal(12,2) NOT NULL DEFAULT '0.00',
  `vendor_payment` decimal(12,2) NOT NULL DEFAULT '0.00',
  `gst_applicable` tinyint(1) NOT NULL DEFAULT '0',
  `gst_rate` decimal(5,2) NOT NULL DEFAULT '18.00',
  `gst_amount` decimal(12,2) NOT NULL DEFAULT '0.00',
  `amount_with_gst` decimal(12,2) NOT NULL DEFAULT '0.00',
  `profit_margin` decimal(12,2) NOT NULL DEFAULT '0.00',
  `invoice_status` enum('Pending','Sent','Not Required') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `payment_status` enum('Pending','Partial','Paid') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `invoice_date` date DEFAULT NULL,
  `payment_received_date` date DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_one_invoice_per_customer_month` (`customer_id`,`invoice_month`,`invoice_year`),
  CONSTRAINT `invoices_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `invoices`
--

LOCK TABLES `invoices` WRITE;
/*!40000 ALTER TABLE `invoices` DISABLE KEYS */;
INSERT INTO `invoices` VALUES (1,1,1,2026,'2026-01-07','2026-01-31',1,NULL,'Auto-generated (Monthly)',1209.68,887.10,1,18.00,217.74,1427.42,322.58,'Sent','Pending','2026-01-06',NULL,NULL,'2026-01-06 15:38:29'),(2,3,12,2025,NULL,NULL,0,'91820','DeskTime Premium Monthly subscription for 37 users at Rs 360/user/month from 1st December 2025 to 31st December 2025',13320.00,9324.00,1,18.00,2397.60,15717.60,3996.00,'Sent','Pending','2025-12-01',NULL,'TEst Invoice','2026-01-06 18:08:37'),(3,3,1,2026,NULL,NULL,0,'93400','DeskTime Premium Monthly subscription for 38 users at Rs 360/user/month from 1st January 2026 to 31st January 2026',14074.84,9852.39,1,18.00,2533.47,16608.31,4222.45,'Sent','Pending','2026-01-01',NULL,NULL,'2026-01-06 18:13:28');
/*!40000 ALTER TABLE `invoices` ENABLE KEYS */;
UNLOCK TABLES;

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

DROP TABLE IF EXISTS `roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `roles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`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` VALUES (3,'Accounts'),(1,'Admin'),(2,'Sales');
/*!40000 ALTER TABLE `roles` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subscription_user_changes`
--

DROP TABLE IF EXISTS `subscription_user_changes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `subscription_user_changes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `subscription_id` int NOT NULL,
  `effective_date` date NOT NULL,
  `old_user_count` int NOT NULL DEFAULT '0',
  `new_user_count` int NOT NULL DEFAULT '0',
  `delta_users` int NOT NULL DEFAULT '0',
  `note` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `billed_invoice_id` int DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `fk_suc_subscription` (`subscription_id`),
  KEY `fk_suc_invoice` (`billed_invoice_id`),
  CONSTRAINT `fk_suc_invoice` FOREIGN KEY (`billed_invoice_id`) REFERENCES `invoices` (`id`),
  CONSTRAINT `fk_suc_subscription` FOREIGN KEY (`subscription_id`) REFERENCES `subscriptions` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subscription_user_changes`
--

LOCK TABLES `subscription_user_changes` WRITE;
/*!40000 ALTER TABLE `subscription_user_changes` DISABLE KEYS */;
INSERT INTO `subscription_user_changes` VALUES (1,2,'2025-12-15',37,39,2,NULL,NULL,'2026-01-06 12:41:00'),(2,2,'2026-01-01',39,38,-1,'reduce',NULL,'2026-01-06 12:45:38');
/*!40000 ALTER TABLE `subscription_user_changes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subscriptions`
--

DROP TABLE IF EXISTS `subscriptions`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `subscriptions` (
  `id` int NOT NULL AUTO_INCREMENT,
  `customer_id` int NOT NULL,
  `plan` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subscription_type` varchar(120) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_count` int NOT NULL DEFAULT '0',
  `cost_per_user` decimal(12,2) NOT NULL DEFAULT '0.00',
  `vendor_cost_per_user` decimal(12,2) NOT NULL DEFAULT '0.00',
  `total_vendor_cost` decimal(12,2) NOT NULL DEFAULT '0.00',
  `start_date` date DEFAULT NULL,
  `billing_cycle` enum('Monthly','Quarterly','Half Yearly','Annually') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Monthly',
  `prorata_enabled` tinyint(1) NOT NULL DEFAULT '0',
  `prorata_consumed` tinyint(1) NOT NULL DEFAULT '0',
  `next_renewal_date` date DEFAULT NULL,
  `renewal_month` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `renewal_year` int DEFAULT NULL,
  `status` enum('Active','In-Active') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Active',
  `inactive_date` date DEFAULT NULL,
  `confirmation_status` enum('Pending','Confirmed','Not Required') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `desktime_account_name` varchar(190) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `updated_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `cycle_base_user_count` int NOT NULL DEFAULT '0',
  `last_billed_date` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_one_subscription_per_customer` (`customer_id`),
  CONSTRAINT `subscriptions_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subscriptions`
--

LOCK TABLES `subscriptions` WRITE;
/*!40000 ALTER TABLE `subscriptions` DISABLE KEYS */;
INSERT INTO `subscriptions` VALUES (1,1,'Pro',NULL,10,150.00,110.00,1100.00,'2026-01-07','Monthly',1,1,'2026-02-28',NULL,NULL,'Active',NULL,'Pending','Test Account','2026-01-06 10:08:30',0,NULL),(2,3,'Premium',NULL,38,360.00,252.00,9576.00,'2025-12-01','Monthly',0,0,'2025-12-31',NULL,NULL,'Active',NULL,'Confirmed','G3 WORLDWIDE PRIVATE LIMITED','2026-01-06 12:45:38',37,NULL);
/*!40000 ALTER TABLE `subscriptions` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `user_adjustments`
--

DROP TABLE IF EXISTS `user_adjustments`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `user_adjustments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `customer_id` int NOT NULL,
  `added_users` int NOT NULL DEFAULT '0',
  `date_added` date DEFAULT NULL,
  `days_remaining` int NOT NULL DEFAULT '0',
  `per_day_price` decimal(12,4) NOT NULL DEFAULT '0.0000',
  `pro_rata_price` decimal(12,2) NOT NULL DEFAULT '0.00',
  `vendor_price` decimal(12,2) NOT NULL DEFAULT '0.00',
  `invoice_status` enum('Pending','Sent','Not Required') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Pending',
  `description` text COLLATE utf8mb4_unicode_ci,
  `remarks` text COLLATE utf8mb4_unicode_ci,
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `customer_id` (`customer_id`),
  CONSTRAINT `user_adjustments_ibfk_1` FOREIGN KEY (`customer_id`) REFERENCES `customers` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `user_adjustments`
--

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

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

DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `full_name` varchar(120) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(190) COLLATE utf8mb4_unicode_ci NOT NULL,
  `password_hash` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `role_id` int NOT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT '1',
  `created_at` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`),
  KEY `role_id` (`role_id`),
  CONSTRAINT `users_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 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,'Pranav Menn','pranav@chlsoftech.com','pbkdf2:sha256:600000$jrWwwmQsYJdVzvCL$95ca42f0b3e47c7a6ca0080bdd69d475b883e169041c90fd6047a0f9b3479a8c',1,1,'2026-01-06 07:34:47'),(2,'Mayank','accounts@chlsoftech.com','pbkdf2:sha256:600000$TOv2pjCTXK9qJTFi$4f6e9f958602fe7a1638b757d527604c310017e2af56625a292f07b6592d841a',3,1,'2026-01-06 08:06:06');
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
SET @@SESSION.SQL_LOG_BIN = @MYSQLDUMP_TEMP_LOG_BIN;
/*!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-01-06 19:21:45
