--
-- Host: sf.cfe-solutions.co.uk    Database: dev_crm
-- ------------------------------------------------------


--
-- 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=30 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,0,'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,0,'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'),(21,30,6,0,'2024-11-08 12:08:32'),(22,31,10,1,'2024-11-08 13:14:10'),(23,31,6,0,'2024-11-11 18:17:30'),(24,33,6,1,'2024-11-11 18:49:22'),(25,28,23,1,'2024-11-18 05:52:27'),(26,28,24,1,'2024-11-18 05:53:35'),(27,28,25,1,'2024-11-18 05:54:43'),(28,28,26,1,'2024-11-18 06:04:24'),(29,33,27,1,'2024-11-18 08:19:06');

--
-- 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 COLLATE utf8mb4_general_ci,
  `enquiry_entered_by` text COLLATE utf8mb4_general_ci,
  `income_range` text COLLATE utf8mb4_general_ci,
  `enquiry_date` text COLLATE utf8mb4_general_ci,
  `username` text COLLATE utf8mb4_general_ci,
  `cnic` text COLLATE utf8mb4_general_ci,
  `date_of_birth` text COLLATE utf8mb4_general_ci,
  `email` text COLLATE utf8mb4_general_ci,
  `father_name` text COLLATE utf8mb4_general_ci,
  `gender` text COLLATE utf8mb4_general_ci,
  `city` text COLLATE utf8mb4_general_ci,
  `present_address` text COLLATE utf8mb4_general_ci,
  `permanent_address` text COLLATE utf8mb4_general_ci,
  `mobile_no_one` text COLLATE utf8mb4_general_ci,
  `mobile_no_two` text COLLATE utf8mb4_general_ci,
  `landline` text COLLATE utf8mb4_general_ci,
  `project` text COLLATE utf8mb4_general_ci,
  `product` text COLLATE utf8mb4_general_ci,
  `developer` text COLLATE utf8mb4_general_ci,
  `price_offered` text COLLATE utf8mb4_general_ci,
  `property_address` text COLLATE utf8mb4_general_ci,
  `image` text COLLATE utf8mb4_general_ci,
  `source_of_information` text COLLATE utf8mb4_general_ci,
  `status` text COLLATE utf8mb4_general_ci,
  `enquiry_status` text COLLATE utf8mb4_general_ci,
  `remarks` text COLLATE utf8mb4_general_ci,
  `field_one` text COLLATE utf8mb4_general_ci,
  `field_two` text COLLATE utf8mb4_general_ci,
  `field_three` text COLLATE utf8mb4_general_ci,
  `field_four` text COLLATE utf8mb4_general_ci,
  `field_five` text COLLATE utf8mb4_general_ci,
  `field_six` text COLLATE utf8mb4_general_ci,
  `field_seven` text COLLATE utf8mb4_general_ci,
  `field_eight` text COLLATE utf8mb4_general_ci,
  `field_nine` text COLLATE utf8mb4_general_ci,
  `field_ten` text COLLATE utf8mb4_general_ci,
  `field_eleven` text COLLATE utf8mb4_general_ci,
  `field_twelve` text COLLATE utf8mb4_general_ci,
  `field_thirteen` text COLLATE utf8mb4_general_ci,
  `field_fourteen` text COLLATE utf8mb4_general_ci,
  `field_fifteen` text COLLATE utf8mb4_general_ci,
  `field_sixteen` text COLLATE utf8mb4_general_ci,
  `field_seventeen` text COLLATE utf8mb4_general_ci,
  `field_eighteen` text COLLATE utf8mb4_general_ci,
  `field_nineteen` text COLLATE utf8mb4_general_ci,
  `field_twenty` text COLLATE utf8mb4_general_ci,
  `office_id` int(11) DEFAULT NULL,
  `matured` text COLLATE utf8mb4_general_ci,
  `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) COLLATE utf8mb4_general_ci 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=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_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','Follow-up Required','Follow-up Required','He will inform later',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 12:05:39','Applicant Interview'),(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','Lead Matured','Follow-up Required','He will contact soon',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'0',21,24,21,21,'2024-10-04 12:07:48','Lead Matured'),(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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,20,'0',27,22,19,19,'2024-10-04 12:09:14','Lead Matured'),(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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,20,'0',27,23,20,20,'2024-10-04 12:11:25','Negotiation'),(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,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,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,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,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,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,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,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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,21,'0',29,30,29,29,'2024-10-04 13:32:36','Negotiation'),(22,'lsbc','lsbc','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','16','undefined','undefined','undefined',NULL,'undefined',NULL,'undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined','undefined',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'1',21,17,14,15,'2024-11-14 08:35:29','Initial Application Review'),(23,NULL,'Data Entry operator 1',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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'0',21,17,14,15,'2024-11-18 05:52:27','Lead Capturing'),(24,NULL,'Data Entry operator 1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Follow-up Required',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-11-18 05:53:35','Lead Capturing'),(25,NULL,'Data Entry operator 1',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,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,18,'0',21,17,14,15,'2024-11-18 05:54:43','Lead Capturing'),(26,NULL,'Data Entry operator 1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Array',NULL,NULL,NULL,NULL,NULL,'Follow-up Required',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-11-18 06:04:24','Lead Capturing'),(27,NULL,'Data Entry operator 1',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,'16,17',NULL,NULL,NULL,NULL,NULL,'Follow-up Required',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-11-18 08:19:06','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=47 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `enquiry_fields` VALUES (1,'Lead Entered By','enquiry_by',0,'Drop Down',1,0,20),(2,'Lead Handled By','enquiry_entered_by',1,'Drop Down',1,0,10),(4,'Income Range (GBP)','income_range',0,'Drop Down',1,0,130),(5,'Visa Status','enquiry_date',0,'Drop Down',1,1,1000),(6,'First Name','username',0,'Text',1,1,30),(7,'Middle Name','cnic',0,'Text',1,0,1100),(8,'Date of Birth','date_of_birth',0,'Date',1,0,140),(9,'Email','email',0,'Text',1,0,90),(10,'Last Name','father_name',0,'Text',1,1,40),(11,'Gender','gender',0,'Drop Down',1,0,50),(12,'City','city',0,'Text',1,0,120),(13,'Present Address','present_address',0,'Text',1,0,110),(14,'Permanent Address','permanent_address',0,'Text',1,0,100),(15,'Mobile No. ','mobile_no_one',0,'Number',1,1,60),(16,'Mobile No. (secondary)','mobile_no_two',0,'Number',1,0,70),(17,'Landline','landline',0,'Number',1,0,80),(18,'Birth Country','project',0,'Drop Down',1,0,1300),(19,'Nationality','product',0,'Drop Down',1,0,1400),(20,'Ethnic Origin','developer',0,'Drop Down',1,0,1500),(21,'Course Fee (GBP)','price_offered',0,'Number',1,0,150),(22,'Religion','property_address',0,'Drop Down',1,0,1600),(23,'Sexual Orientation','image \r\n',0,'Drop Down',1,0,1700),(24,'Hear About us','source_of_information',0,'Drop Down',1,0,160),(25,'Passport Issue','enquiry_status',0,'Date',1,0,2800),(26,'Criminal Conviction','remarks',0,'Drop Down',1,1,170),(27,'Course Title','field_one',0,'Drop Down',1,0,1800),(28,'Intake','field_two',0,'Drop Down',1,0,1900),(29,'Year','field_three',0,'Drop Down',1,0,2000),(30,'Course Start Date','field_four',0,'Date',0,1,2100),(31,'Course End Date','field_five',0,'Date',1,0,2200),(32,'Place of Study/Campus','field_six',0,'Drop Down',1,0,2300),(33,'Visa Required','field_seven',0,'Drop Down',1,0,2400),(34,'Visa Valid From','field_eight',0,'Date',1,0,2500),(35,'Visa Expiry','field_nine',0,'Date',1,0,2600),(36,'Passport No.','field_ten',0,'Text',1,0,2700),(37,'field_eleven','field_eleven',0,'Text',1,0,2800),(38,'field_twelve','field_twelve',0,'Text',1,0,2900),(39,'field_thirteen','field_thirteen',0,'Text',1,0,3000),(40,'field_fourteen','field_fourteen',0,'Text',1,0,3100),(41,'field_fifteen','field_fifteen',0,'Text',1,0,3200),(42,'field_sixteen','field_sixteen',0,'Text',1,0,3300),(43,'field_seventeen','field_seventeen',0,'Text',1,0,3400),(44,'field_eighteen','field_eighteen',0,'Text',1,0,3500),(45,'field_nineteen','field_nineteen',0,'Text',1,0,3600),(46,'field_twenty','field_twenty',0,'Text',1,0,3700);

--
-- 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=45 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'),(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'),(30,'Matured','enquiry_status'),(31,'Dropped','enquiry_status'),(32,'Follow-up Required','enquiry_status'),(35,'Male','gender'),(36,'Female','gender'),(37,'Prefer not to say','gender'),(38,'Pakistan','project'),(39,'Pakistan','product'),(40,'Yes','field_seven'),(41,'No','field_seven'),(42,'Granted','enquiry_date'),(43,'Rejected','enquiry_date'),(44,'Pending','enquiry_date');

--
-- Table structure for table `enquiry_images`
--

CREATE TABLE `enquiry_images` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image_path` text,
  `title` text,
  `enquiry_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `enquiry_images`
--

INSERT INTO `enquiry_images` VALUES (1,'673ad65fb9574_141-536x354.jpg','AA',24),(2,'673ad6a3c9a16_141-536x354.jpg','AAA',25),(3,'673ad8e93a10a_logo.png','AAAA',26),(4,'673af87ab50d7_141-536x354.jpg','AAA',27);

--
-- 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=23 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'),(21,26,16,'2024-11-18 07:16:30'),(22,26,17,'2024-11-18 07:16:31');

--
-- 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,
  `next_followup_type` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 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,NULL),(2,29,14,'','2','Phone Not Picked',NULL,NULL,'2024-10-04','2024-10-07',NULL,NULL,NULL),(3,33,13,'','1','Wrong Number',NULL,NULL,'2024-10-03','2024-10-06',NULL,NULL,NULL),(4,33,17,'','3','Follow-up Required',NULL,NULL,'2024-10-02','2024-10-08',NULL,NULL,NULL),(5,30,7,'','4','Lead Matured','gggg','900','2024-11-08','2024-11-08',NULL,NULL,NULL),(6,30,6,'','3','Follow-up Required',NULL,'5000','2024-11-08','2024-11-08',NULL,NULL,NULL),(7,30,6,'','3','Lead Matured',NULL,'4500','2024-11-08','2024-11-08',NULL,NULL,NULL),(8,30,6,'','5','Follow-up Required',NULL,'4000','2024-11-07','2024-11-10',NULL,NULL,NULL),(9,28,24,'','3','Follow-up Required','123','123','2024-11-18','2024-11-18',NULL,NULL,'Call'),(10,28,26,'','4','Follow-up Required','asd','12333','2024-11-18','2024-11-19',NULL,NULL,'Meeting'),(11,28,26,'','3','Follow-up Required','123','123','2024-11-18','2024-11-19',NULL,NULL,'Meeting'),(12,28,26,'','3','Follow-up Required','123','123','2024-11-18','2024-11-18',NULL,NULL,'Call'),(13,33,27,'','2','Follow-up Required','3','23','2024-11-18','2024-11-18',NULL,NULL,'Call');

--
-- 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=21 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'),(17,16,11,'2024-11-18 07:17:10'),(18,17,11,'2024-11-18 07:17:10'),(19,16,12,'2024-11-18 08:10:36'),(20,17,12,'2024-11-18 08:10: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,
  `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'
) ENGINE=InnoDB 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),(61,20,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,0,1,0,1,1,0,1,1,1,0,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=18 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),(17,'ad','asd','Product','2024-11-18 07:15:53',123);

--
-- 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=22 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),(20,'Recruitment Agent',1);


