--
-- Host: localhost    Database: careconnect_db
-- ------------------------------------------------------


--
-- Table structure for table `tbl_attendees_master`
--

CREATE TABLE `tbl_attendees_master` (
  `PK_Attendees_id` int NOT NULL AUTO_INCREMENT,
  `FK_EventId` int DEFAULT NULL,
  `registered_date_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `title` varchar(15) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `middle_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `gender` varchar(45) DEFAULT NULL,
  `email_id` varchar(100) DEFAULT NULL,
  `mobile_number` varchar(15) DEFAULT NULL,
  `dob` varchar(45) DEFAULT NULL,
  `address` varchar(500) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `state` varchar(100) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `event_start_date` datetime DEFAULT NULL,
  `event_end_date` datetime DEFAULT NULL,
  `isActive` tinyint NOT NULL DEFAULT '1',
  `isDeleted` tinyint NOT NULL DEFAULT '0',
  `isSuspended` tinyint DEFAULT '0',
  `createdDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updatedDate` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` varchar(200) DEFAULT NULL,
  `updated_by` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`PK_Attendees_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tbl_attendees_master`
--


--
-- Table structure for table `tbl_dependents_master`
--

CREATE TABLE `tbl_dependents_master` (
  `dependent_id` int NOT NULL AUTO_INCREMENT,
  `registration_id` int NOT NULL,
  `name` varchar(255) NOT NULL,
  `relation` varchar(255) DEFAULT NULL,
  `gender` enum('Male','Female','Other') DEFAULT NULL,
  `dob` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`dependent_id`),
  KEY `registration_id` (`registration_id`),
  CONSTRAINT `tbl_dependents_master_ibfk_1` FOREIGN KEY (`registration_id`) REFERENCES `tbl_registrations_master` (`registration_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tbl_dependents_master`
--


--
-- Table structure for table `tbl_module_master`
--

CREATE TABLE `tbl_module_master` (
  `module_id` int NOT NULL AUTO_INCREMENT,
  `module_name` varchar(100) DEFAULT NULL,
  `description` longtext,
  `url` varchar(100) DEFAULT NULL,
  `isActive` tinyint DEFAULT '1',
  `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` varchar(200) DEFAULT NULL,
  `updated_by` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`module_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tbl_module_master`
--

INSERT INTO `tbl_module_master` VALUES (1,'Home','Dashboard','/dashboard',1,'2025-02-06 05:39:52','2025-02-06 05:40:30','system','system'),(2,'Profile','Profile','/dashboard/profile',1,'2025-02-06 05:39:52','2025-02-06 05:40:30','system','system'),(3,'ManageUser','User Screen','/dashboard/settings/manageUser',1,'2025-02-06 05:39:52','2025-02-06 05:40:30','system','system'),(4,'ManageRole','Role Screen','/settings/manageRole',1,'2025-02-06 05:39:52','2025-02-06 05:40:30','system','system');

--
-- Table structure for table `tbl_registrations_master`
--

CREATE TABLE `tbl_registrations_master` (
  `registration_id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(10) NOT NULL,
  `first_name` varchar(100) NOT NULL,
  `middle_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) NOT NULL,
  `gender` enum('Male','Female','Other') NOT NULL,
  `dob` date NOT NULL,
  `email` varchar(45) DEFAULT NULL,
  `contact_number` varchar(20) NOT NULL,
  `alternate_contact_number` varchar(20) DEFAULT NULL,
  `address` text NOT NULL,
  `country` varchar(100) NOT NULL,
  `state` varchar(100) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `completed_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`registration_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tbl_registrations_master`
--

INSERT INTO `tbl_registrations_master` VALUES (1,'Mr.','Dev','','Saxena','Male','2025-03-07','dev.saxena@shardatech.org','9520216040','','Alpha 1','','','',NULL,'2025-03-29 07:25:11');

--
-- Table structure for table `tbl_role_master`
--

CREATE TABLE `tbl_role_master` (
  `role_id` int NOT NULL AUTO_INCREMENT,
  `role_name` varchar(100) DEFAULT NULL,
  `description` longtext,
  `isActive` tinyint DEFAULT '1',
  `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` varchar(200) DEFAULT NULL,
  `updated_by` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`role_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tbl_role_master`
--

INSERT INTO `tbl_role_master` VALUES (1,'Admin','Admin',1,'2025-02-06 06:11:54','2025-02-06 06:11:54',NULL,NULL),(2,'Employee','Employee',1,'2025-03-20 06:37:58','2025-03-20 06:37:58',NULL,NULL);

--
-- Table structure for table `tbl_role_module_permission`
--

CREATE TABLE `tbl_role_module_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `role_id` int DEFAULT NULL,
  `module_id` int DEFAULT NULL,
  `create` tinyint DEFAULT '0',
  `read` tinyint DEFAULT '0',
  `update` tinyint DEFAULT '0',
  `delete` tinyint DEFAULT '0',
  `special` tinyint DEFAULT '0',
  `isActive` tinyint DEFAULT '1',
  `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `created_by` varchar(200) DEFAULT NULL,
  `updated_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_by` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tbl_role_module_permission`
--

INSERT INTO `tbl_role_module_permission` VALUES (1,1,1,1,1,1,1,1,1,'2025-02-06 06:11:54',NULL,'2025-02-06 06:11:54',NULL),(2,1,2,1,1,1,1,1,1,'2025-02-06 06:11:54',NULL,'2025-02-06 06:11:54',NULL),(3,1,4,1,1,1,1,1,1,'2025-02-06 06:11:54',NULL,'2025-02-06 06:11:54',NULL),(4,1,3,1,1,1,1,1,1,'2025-02-06 06:11:54',NULL,'2025-02-06 06:11:54',NULL),(5,2,1,0,1,0,0,0,1,'2025-03-20 06:37:58',NULL,'2025-03-20 06:37:58',NULL),(6,2,4,0,0,0,0,0,1,'2025-03-20 06:37:58',NULL,'2025-03-20 06:37:58',NULL),(7,2,3,0,0,0,0,0,1,'2025-03-20 06:37:58',NULL,'2025-03-20 06:37:58',NULL),(8,2,2,0,0,0,0,0,1,'2025-03-20 06:37:58',NULL,'2025-03-20 06:37:58',NULL);

--
-- Table structure for table `tbl_user_role_permission`
--

CREATE TABLE `tbl_user_role_permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `role_id` int DEFAULT NULL,
  `isActive` tinyint DEFAULT '1',
  `created_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `created_by` varchar(200) DEFAULT NULL,
  `updated_by` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tbl_user_role_permission`
--

INSERT INTO `tbl_user_role_permission` VALUES (3,3,1,1,'2025-02-19 11:39:08','2025-02-19 11:39:08',NULL,NULL),(5,4,2,1,'2025-03-20 06:38:22','2025-03-20 06:38:22',NULL,NULL),(6,4,1,1,'2025-03-20 06:38:22','2025-03-20 06:38:22',NULL,NULL),(7,1,1,1,'2025-03-28 04:18:52','2025-03-28 04:18:52',NULL,NULL),(8,1,2,1,'2025-03-28 04:18:52','2025-03-28 04:18:52',NULL,NULL);


