--
-- Host: 192.119.110.10    Database: smartcrm
-- ------------------------------------------------------


--
-- Table structure for table `assign_enquiries`
--

CREATE TABLE `assign_enquiries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `enquiry_id` int(11) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `assign_enquiries`
--

INSERT INTO `assign_enquiries` VALUES (1,29,1,0,'2024-10-04 06:30:04'),(2,30,1,1,'2024-10-04 06:35:29'),(3,31,2,1,'2024-10-04 06:45:58'),(4,33,3,1,'2024-10-04 08:56:42'),(5,33,4,1,'2024-10-04 09:07:28'),(6,33,5,1,'2024-10-04 12:02:26'),(7,29,6,1,'2024-10-04 13:12:41'),(8,30,7,1,'2024-10-04 13:12:59'),(9,31,8,0,'2024-10-04 13:13:15'),(10,33,9,1,'2024-10-04 13:13:27'),(11,29,10,1,'2024-10-04 14:05:31'),(12,30,11,1,'2024-10-04 14:05:58'),(13,31,12,1,'2024-10-04 14:06:19'),(14,33,13,1,'2024-10-04 14:06:34'),(15,29,14,1,'2024-10-04 14:33:01'),(16,30,15,1,'2024-10-04 14:33:19'),(17,31,16,1,'2024-10-04 14:33:39'),(18,33,17,1,'2024-10-04 14:33:55'),(19,30,8,1,'2024-10-04 15:43:39'),(20,33,18,1,'2024-10-05 11:33:55');

--
-- Table structure for table `category_level_four`
--

CREATE TABLE `category_level_four` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_level_three_id` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `category_level_three_id` (`category_level_three_id`),
  CONSTRAINT `category_level_four_ibfk_1` FOREIGN KEY (`category_level_three_id`) REFERENCES `category_level_three` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `category_level_four`
--

INSERT INTO `category_level_four` VALUES (15,14,'October 2024'),(19,19,'December 2024'),(20,20,'November 2024'),(21,21,'October 2024'),(22,22,'October 2024'),(23,23,'September 2024'),(24,24,'September 2024'),(25,25,'December 2024'),(26,26,'December 2024'),(27,27,'December 2024'),(28,28,'November 2024'),(29,29,'November 2024');

--
-- Table structure for table `category_level_one`
--

CREATE TABLE `category_level_one` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `office_id` int(11) DEFAULT NULL,
  `organization_id` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `organization_id` (`organization_id`),
  KEY `office_id` (`office_id`),
  CONSTRAINT `category_level_one_ibfk_1` FOREIGN KEY (`organization_id`) REFERENCES `organization` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `category_level_one_ibfk_2` FOREIGN KEY (`office_id`) REFERENCES `office` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `category_level_one`
--

INSERT INTO `category_level_one` VALUES (21,18,NULL,'QUALIFI'),(27,20,NULL,'OTHM'),(29,21,NULL,'Language Cert');

--
-- Table structure for table `category_level_three`
--

CREATE TABLE `category_level_three` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_level_two_id` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `category_level_two_id` (`category_level_two_id`),
  CONSTRAINT `category_level_three_ibfk_1` FOREIGN KEY (`category_level_two_id`) REFERENCES `category_level_two` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `category_level_three`
--

INSERT INTO `category_level_three` VALUES (14,17,'Level 3 Diploma in Accounting and Finance'),(19,22,'Level 7 Diploma in Business Management'),(20,23,'Level 5 Diploma in Health and Social Care Management'),(21,24,'Level 7 Diploma in Information Technology'),(22,25,'Level 5 Diploma in Law'),(23,26,'Level 8 Diploma in Strategic Management and Leadership'),(24,28,'Level 7 Diploma in Leadership'),(25,29,'Level 3 Diploma Foundation in Social Care'),(26,30,'CEFR Levles B1'),(27,30,'CEFR Levles B2'),(28,30,'CEFR Levles C1'),(29,30,'CEFR Levles C2');

--
-- Table structure for table `category_level_two`
--

CREATE TABLE `category_level_two` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_level_one_id` int(11) DEFAULT NULL,
  `name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `category_level_one_id` (`category_level_one_id`),
  CONSTRAINT `category_level_two_ibfk_1` FOREIGN KEY (`category_level_one_id`) REFERENCES `category_level_one` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `category_level_two`
--

INSERT INTO `category_level_two` VALUES (17,21,'Accounting and Finance'),(22,27,'Business Management'),(23,27,'Health and Social Care'),(24,21,'Information Systems'),(25,21,'Legal Studies'),(26,21,'Business Studies'),(28,27,'Leadership Studies'),(29,27,'Social Care'),(30,29,'International ESOL');

--
-- Table structure for table `complaint_bd`
--

CREATE TABLE `complaint_bd` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `enquiry_id` int(11) DEFAULT NULL,
  `to_user` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `email_subject` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `email_body` text COLLATE utf8mb4_general_ci,
  `type_of` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status_request` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `complaint_bd`
--


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

CREATE TABLE `enquiries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `enquiry_by` text,
  `enquiry_entered_by` text,
  `income_range` text,
  `enquiry_date` text,
  `username` text,
  `cnic` text,
  `date_of_birth` text,
  `email` text,
  `father_name` text,
  `gender` text,
  `city` text,
  `present_address` text,
  `permanent_address` text,
  `mobile_no_one` text,
  `mobile_no_two` text,
  `landline` text,
  `project` text,
  `product` text,
  `developer` text,
  `price_offered` text,
  `property_address` text,
  `image` text,
  `source_of_information` text,
  `status` text,
  `enquiry_status` text,
  `remarks` text,
  `field_one` text,
  `field_two` text,
  `field_three` text,
  `field_four` text,
  `field_five` text,
  `field_six` text,
  `field_seven` text,
  `field_eight` text,
  `field_nine` text,
  `field_ten` text,
  `office_id` int(11) DEFAULT NULL,
  `matured` text,
  `cat_one_id` int(11) DEFAULT NULL,
  `cat_two_id` int(11) DEFAULT NULL,
  `cat_three_id` int(11) DEFAULT NULL,
  `cat_four_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `enquiry_status_steps` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `office_id` (`office_id`),
  KEY `cat_one_id` (`cat_one_id`),
  KEY `cat_two_id` (`cat_two_id`),
  KEY `cat_three_id` (`cat_three_id`),
  KEY `cat_four_id` (`cat_four_id`),
  CONSTRAINT `enquiries_ibfk_1` FOREIGN KEY (`office_id`) REFERENCES `office` (`id`),
  CONSTRAINT `enquiries_ibfk_2` FOREIGN KEY (`cat_one_id`) REFERENCES `category_level_one` (`id`),
  CONSTRAINT `enquiries_ibfk_3` FOREIGN KEY (`cat_two_id`) REFERENCES `category_level_two` (`id`),
  CONSTRAINT `enquiries_ibfk_4` FOREIGN KEY (`cat_three_id`) REFERENCES `category_level_three` (`id`),
  CONSTRAINT `enquiries_ibfk_5` FOREIGN KEY (`cat_four_id`) REFERENCES `category_level_four` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

INSERT INTO `enquiries` VALUES (6,'John','John','10,000 - 20,000',NULL,'Nolan',NULL,'2000-10-10','nolan@gmail.com','Cameron','Male','London','51 Boar Lane','51 Boar Lane','02012345678','02087654321','0206598977',NULL,NULL,NULL,'5000',NULL,NULL,'Social Media','Lead Matured','Follow-up Required','He will inform later',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'0',21,17,14,15,'2024-10-04 12:05:39','Lead Matured'),(7,'admin','admin','20,000 - 30,000',NULL,'Isaac',NULL,'2002-12-15','isaac@gmail.com','Dylaan','Male','London','52 Boar Lane','52 Boar Lane','02085214698','02032587001','020069596897',NULL,NULL,NULL,'7000',NULL,NULL,'Friend & Family Members','Phone Not Picked','Follow-up Required','He will contact soon',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'0',21,24,21,21,'2024-10-04 12:07:48','Lead Capturing'),(8,'zubair','zubair','30,000 - 40,000',NULL,'Anthony',NULL,'2001-10-15','carter@gmail.com','Carter','Male','Manchester','55 Boar Lane','55 Boar Lane','02065478125','02025887168','02021488540',NULL,NULL,NULL,'9000',NULL,NULL,'Social Media',NULL,'Follow-up Required','Call next week',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,20,'0',27,22,19,19,'2024-10-04 12:09:14','Lead Nurturing'),(9,'Jacob','Jacob','20,000 - 30,000',NULL,'Axel',NULL,'2003-08-10','axel@gmail.com','Walker','Male','Manchester',' 57 Boar Lane','57 Boar Lane','020365657841','02032144478','02022577895',NULL,NULL,NULL,'10000',NULL,NULL,'Friend & Family Members','Lead Matured','Follow-up Required','Not sure now',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,20,'0',27,23,20,20,'2024-10-04 12:11:25','Lead Matured'),(10,'admin','admin','10,000 - 20,000',NULL,'Easton',NULL,'1999-06-15','easton@gmail.com','Bennett','Male','London','58 Boar Lane','58 Boar Lane','02055989778','02054778156','02079460000',NULL,NULL,NULL,'11000',NULL,NULL,'Friend & Family Members','Call Disconnected','Follow-up Required','Not sure now',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'0',21,25,22,22,'2024-10-04 12:50:36','Lead Capturing'),(11,'admin','admin','20,000 - 30,000',NULL,'Jose',NULL,'2003-12-10','jose@gmail.com','Colton','Male','London','59 Boar Lane','59 Boar Lane','02054447820','02065477102','020795654180',NULL,NULL,NULL,'12000',NULL,NULL,'Social Media','Dropped','Follow-up Required','Call next week',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'0',21,26,23,23,'2024-10-04 12:52:33','Dropped'),(12,'zubair','zubair','30,000 - 40,000',NULL,'River',NULL,'2002-10-10','river@gmail.com','Austin','Male','Manchester','60 Boar Lane','60 Boar Lane','02054790257','02035774109','02098715205',NULL,NULL,NULL,'13000',NULL,NULL,'Friend & Family Members',NULL,'Follow-up Required','He will inform later',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,20,'0',27,28,24,24,'2024-10-04 13:00:16','Lead Qualification'),(13,'Jacob','Jacob','20,000 - 30,000',NULL,'Jasper',NULL,'2004-12-12','Jasper','Bryson','Male','Manchester','61 Boar Lane','61 Boar Lane','02031255781','02032589410','02036485201',NULL,NULL,NULL,'15000',NULL,NULL,'Social Media','Wrong Number','Follow-up Required','He will contact soon',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,20,'0',27,29,25,25,'2024-10-04 13:02:15','Proposal/ Quotation'),(14,'John','John','30,000 - 40,000',NULL,'George',NULL,'1999-12-10','george@gmail.com','Carlos','Male','Birmingham','63 Boar Lane','63 Boar Lane','02054778540','02065871068','02035871024',NULL,NULL,NULL,'12000',NULL,NULL,'Social Media','Phone Not Picked','Follow-up Required','He will inform later',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,21,'0',29,30,26,26,'2024-10-04 13:21:51','Lead Nurturing'),(15,'Atif','Atif','20,000 - 30,000',NULL,'Tyler',NULL,'2005-02-05','tyler@gmail.com','Finn','Male','Birmingham','64 Boar Lane','64 Boar Lane','02051028750','02062875620','02065587492',NULL,NULL,NULL,'8000',NULL,NULL,'Friend & Family Members',NULL,'Follow-up Required','Not sure now',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,21,'0',29,30,27,27,'2024-10-04 13:28:26','Lead Qualification'),(16,'zubair','zubair','30,000 - 40,000',NULL,'Justin',NULL,'2005-05-04','justin@gmail.com','Kevin','Male','Birmingham','65 Boar Lane','65 Boar Lane','02054875207','02059820468','02068874250',NULL,NULL,NULL,'10000',NULL,NULL,'Social Media',NULL,'Follow-up Required','He will contact soon',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,21,'0',29,30,28,28,'2024-10-04 13:30:30','Negotiation'),(17,'Jacob','Jacob','30,000 - 40,000',NULL,'Gavin',NULL,'2002-09-05','gavin@gmail.com','Brody','Male','Birmingham','66 Boar Lane','66 Boar Lane','0205476024','02024581024','02036587450',NULL,NULL,NULL,'11000',NULL,NULL,'Friend & Family Members','Follow-up Required','Follow-up Required','He will inform later',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,21,'0',29,30,29,29,'2024-10-04 13:32:36','Proposal/ Quotation'),(18,'Atif','Atif',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'0',21,17,14,15,'2024-10-04 17:55:38','Lead Capturing');

--
-- Table structure for table `enquiry_fields`
--

CREATE TABLE `enquiry_fields` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `field_name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `status` tinyint(1) NOT NULL,
  `type` varchar(11) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `show_field` tinyint(1) NOT NULL DEFAULT '0',
  `report_show` tinyint(4) NOT NULL DEFAULT '0',
  `order_no` int(11) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `enquiry_fields`
--

INSERT INTO `enquiry_fields` VALUES (1,'Lead Entered By','enquiry_by',1,'Drop Down',0,0,20),(2,'Lead Handled By','enquiry_entered_by',1,'Drop Down',0,0,10),(4,'Income Range (GBP)','income_range',1,'Drop Down',0,0,130),(5,'Un-named Field 1','enquiry_date',0,'Text',0,0,1000),(6,'First Name','username',1,'Text',1,1,30),(7,'Un-named Field 2','cnic',0,'Text',0,0,1100),(8,'Date of Birth','date_of_birth',1,'Date',0,0,140),(9,'Email','email',1,'Text',0,0,90),(10,'Last Name','father_name',1,'Text',1,1,40),(11,'Gender','gender',1,'Drop Down',0,0,50),(12,'City','city',1,'Text',0,0,120),(13,'Present Address','present_address',1,'Text',0,0,110),(14,'Permanent Address','permanent_address',1,'Text',0,0,100),(15,'Mobile No. ','mobile_no_one',1,'Number',1,1,60),(16,'Mobile No. (secondary)','mobile_no_two',1,'Number',0,0,70),(17,'Landline','landline',1,'Number',0,0,80),(18,'Un-named Field 3','project',0,'Text',0,0,1300),(19,'Un-named Field 4','product',0,'Text',0,0,1400),(20,'Un-named Field 5','developer',0,'Text',0,0,1500),(21,'Course Fee (GBP)','price_offered',1,'Number',0,0,150),(22,'Un-named Field 6','property_address',0,'Text',0,0,1600),(23,'Un-named Field 7','image \r\n',0,'Text',0,0,1700),(24,'Source of Information','source_of_information',1,'Drop Down',0,0,160),(25,'Un-named Field 18','enquiry_status',0,'Text',0,0,2800),(26,'Remarks','remarks',1,'Text',1,1,170),(27,'Un-named Field 8','field_one',0,'Text',0,0,1800),(28,'Un-named Field 9','field_two',0,'Text',0,0,1900),(29,'Un-named Field 10','field_three',0,'Text',0,0,2000),(30,'Un-named Field 11','field_four',0,'Text',0,0,2100),(31,'Un-named Field 12','field_five',0,'Text',0,0,2200),(32,'Un-named Field 13','field_six',0,'Text',0,0,2300),(33,'Un-named Field 14','field_seven',0,'Text',0,0,2400),(34,'Un-named Field 15','field_eight',0,'Text',0,0,2500),(35,'Un-named Field 16','field_nine',0,'Text',0,0,2600),(36,'Un-named Field 17','field_ten',0,'Text',0,0,2700);

--
-- Table structure for table `enquiry_fields_dropdown`
--

CREATE TABLE `enquiry_fields_dropdown` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dropdown` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `field_name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `enquiry_fields_dropdown`
--

INSERT INTO `enquiry_fields_dropdown` VALUES (12,'Admission Officer','enquiry_by'),(13,'LAP Centre','enquiry_by'),(14,'Data Entry operator 1','enquiry_entered_by'),(15,'Data Entry operator 2','enquiry_entered_by'),(16,'Male','enquiry_date'),(17,'Female','enquiry_date'),(18,'Prefer not to say','enquiry_date'),(19,'Others','enquiry_date'),(20,'10,000 - 20,000','income_range'),(21,'20,000 - 30,000','income_range'),(22,'30,000 - 40,000','income_range'),(25,'Social Media','source_of_information'),(26,'Friend & Family Members','source_of_information'),(27,'Male','gender'),(28,'Female','gender'),(29,'Prefer not to say','gender'),(30,'Matured','enquiry_status'),(31,'Dropped','enquiry_status'),(32,'Follow-up Required','enquiry_status');

--
-- Table structure for table `enquiry_products`
--

CREATE TABLE `enquiry_products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `enquiry_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `enquiry_products`
--

INSERT INTO `enquiry_products` VALUES (3,2,1,'2024-08-08 13:12:03'),(4,2,2,'2024-08-08 13:12:03'),(5,1,1,'2024-08-09 12:17:41'),(6,1,3,'2024-08-09 12:17:41'),(8,7,9,'2024-09-12 09:56:52'),(9,8,10,'2024-09-24 06:56:07'),(10,9,11,'2024-09-24 11:40:20'),(12,10,10,'2024-09-27 13:51:12'),(14,15,13,'2024-10-02 06:45:57'),(15,15,14,'2024-10-02 06:45:57'),(18,3,16,'2024-10-04 07:54:30'),(20,4,16,'2024-10-04 08:06:45');

--
-- Table structure for table `follow_up`
--

CREATE TABLE `follow_up` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `enquiry_id` int(11) DEFAULT NULL,
  `called_by` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `called_type` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `called_status` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_general_ci,
  `price_offered` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `followup_date` date DEFAULT NULL,
  `next_followup_date` date DEFAULT NULL,
  `created_at` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `follow_up_products` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `follow_up`
--

INSERT INTO `follow_up` VALUES (1,29,10,'','2','Call Disconnected',NULL,NULL,'2024-10-04','2024-10-06',NULL,NULL),(2,29,14,'','2','Phone Not Picked',NULL,NULL,'2024-10-04','2024-10-07',NULL,NULL),(3,33,13,'','1','Wrong Number',NULL,NULL,'2024-10-03','2024-10-06',NULL,NULL),(4,33,17,'','3','Follow-up Required',NULL,NULL,'2024-10-02','2024-10-08',NULL,NULL);

--
-- Table structure for table `follow_up_products`
--

CREATE TABLE `follow_up_products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) DEFAULT NULL,
  `follow_up_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `follow_up_products`
--

INSERT INTO `follow_up_products` VALUES (15,16,6,'2024-10-04 09:13:39'),(16,16,7,'2024-10-04 09:32:36');

--
-- Table structure for table `organization`
--

CREATE TABLE `organization` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `currency` varchar(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'PKR',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `organization`
--

INSERT INTO `organization` VALUES (21,'Lords','GBP');

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

CREATE TABLE `permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role_id` int(11) DEFAULT NULL,
  `user_tab` tinyint(4) DEFAULT '0',
  `user_add` tinyint(1) DEFAULT NULL,
  `user_view` tinyint(1) DEFAULT NULL,
  `user_delete` tinyint(1) DEFAULT NULL,
  `user_edit` tinyint(1) DEFAULT NULL,
  `role_tab` tinyint(1) DEFAULT NULL,
  `role_add` tinyint(1) DEFAULT NULL,
  `role_delete` tinyint(1) DEFAULT NULL,
  `organization_tab` tinyint(1) DEFAULT NULL,
  `organization_add` tinyint(1) DEFAULT NULL,
  `organization_delete` tinyint(1) DEFAULT NULL,
  `office_tab` tinyint(1) DEFAULT NULL,
  `office_add` tinyint(1) DEFAULT NULL,
  `office_delete` tinyint(1) DEFAULT NULL,
  `cat_level_one_tab` tinyint(1) DEFAULT NULL,
  `cat_level_one_add` tinyint(1) DEFAULT NULL,
  `cat_level_one_delete` tinyint(1) DEFAULT NULL,
  `cat_level_two_tab` tinyint(1) DEFAULT NULL,
  `cat_level_two_add` tinyint(1) DEFAULT NULL,
  `cat_level_two_delete` tinyint(1) DEFAULT NULL,
  `cat_level_three_tab` tinyint(1) DEFAULT NULL,
  `cat_level_three_add` tinyint(1) DEFAULT NULL,
  `cat_level_three_delete` tinyint(1) DEFAULT NULL,
  `cat_level_four_tab` tinyint(1) DEFAULT NULL,
  `cat_level_four_add` tinyint(1) DEFAULT NULL,
  `cat_level_four_delete` tinyint(1) DEFAULT NULL,
  `enquiry_field_tab` tinyint(1) DEFAULT NULL,
  `enquiries_tab` tinyint(1) DEFAULT NULL,
  `enquiries_add` tinyint(1) DEFAULT NULL,
  `enquiries_delete` tinyint(1) DEFAULT NULL,
  `enquiries_edit` tinyint(1) DEFAULT NULL,
  `enquiries_view` tinyint(1) DEFAULT NULL,
  `enquiries_assign` tinyint(1) DEFAULT NULL,
  `follow_up_tab` tinyint(1) DEFAULT NULL,
  `follow_up_add` tinyint(1) DEFAULT NULL,
  `follow_up_view` tinyint(1) DEFAULT NULL,
  `customer_tab` tinyint(1) DEFAULT '0',
  `followup_report` tinyint(4) NOT NULL DEFAULT '0',
  `enquiry_report` tinyint(4) NOT NULL DEFAULT '0',
  `products_tab` tinyint(4) NOT NULL DEFAULT '0',
  `products_add` tinyint(4) NOT NULL DEFAULT '0',
  `products_edit` tinyint(4) NOT NULL DEFAULT '0',
  `products_delete` tinyint(4) NOT NULL DEFAULT '0',
  `cat_level_four_update` tinyint(4) NOT NULL DEFAULT '0',
  `cat_level_three_update` tinyint(4) NOT NULL DEFAULT '0',
  `cat_level_one_update` tinyint(4) NOT NULL DEFAULT '0',
  `cat_level_two_update` tinyint(4) NOT NULL DEFAULT '0',
  `organization_update` tinyint(4) NOT NULL DEFAULT '0',
  `permissionscol` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `role_id` (`role_id`),
  CONSTRAINT `permissions_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `permissions` VALUES (51,10,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0),(52,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0),(53,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0),(57,16,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,0),(58,17,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0),(59,18,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0),(60,19,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0);

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

CREATE TABLE `products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_name` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `details` text COLLATE utf8mb4_general_ci NOT NULL,
  `type_of_product` varchar(50) COLLATE utf8mb4_general_ci NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `price` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `products` VALUES (16,'Smart Folder','Smart Folder is an innovative solution designed to simplify and enhance the processes. With a user-friendly interface and powerful features, Smart Folder enables seamless records.','Product','2024-10-04 07:30:34',3000);

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

CREATE TABLE `roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `role` varchar(255) COLLATE utf8mb4_general_ci NOT NULL,
  `self_inquiries` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `roles` VALUES (10,'Admin',0),(12,'Admission Manager',0),(18,'Inquiry Officer',1),(19,'Admission Assistant',1);


