CREATE TABLE `tbl_module_master` (
  `PK_ModuleId` int NOT NULL AUTO_INCREMENT,
  `moduleName` varchar(225) DEFAULT NULL,
  `description` longtext,
  `isActive` tinyint DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `created_by` int DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_by` int DEFAULT NULL,
  PRIMARY KEY (`PK_ModuleId`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;

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

INSERT INTO `tbl_module_master` VALUES (1,'Dashboard','Dashboard Descriptions',1,'2024-01-25 11:05:44',NULL,'2024-02-07 10:39:22',NULL),(2,'RoleScreen','RoleScreen Description',1,'2024-01-30 06:24:29',NULL,'2024-02-07 10:39:22',NULL),(3,'ModuleScreen','ModuleScreen Description',1,'2024-01-30 06:24:47',NULL,'2024-02-07 10:39:22',NULL),(4,'UserScreen','UserScreen Description',1,'2024-01-30 10:05:11',NULL,'2024-02-07 10:39:22',NULL);

CREATE TABLE `tbl_role_master` (
  `PK_RoleId` int NOT NULL AUTO_INCREMENT,
  `roleName` varchar(225) DEFAULT NULL,
  `description` longtext,
  `isActive` tinyint DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `created_by` int DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_by` int DEFAULT NULL,
  PRIMARY KEY (`PK_RoleId`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

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

INSERT INTO `tbl_role_master` VALUES (1,'Admin','Admin',1,'2024-01-30 10:28:06',NULL,'2024-04-25 06:12:41',NULL),(2,'Security','Security',1,'2024-02-01 12:06:09',NULL,'2024-11-08 04:41:23',NULL),(3,'Meal','Meal',1,'2024-02-01 12:19:35',NULL,'2024-11-08 04:41:23',NULL);

CREATE TABLE `tbl_role_module_permission` (
  `PK_role_module_permissionId` int NOT NULL AUTO_INCREMENT,
  `FK_RoleId` int DEFAULT NULL,
  `FK_ModuleId` 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_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `created_by` int DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_by` int DEFAULT NULL,
  PRIMARY KEY (`PK_role_module_permissionId`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4;

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

INSERT INTO `tbl_role_module_permission` VALUES (1,2,1,0,1,1,0,0,1,'2024-02-01 12:06:09',NULL,'2024-02-06 04:55:04',NULL),(2,2,2,0,1,0,0,0,1,'2024-02-01 12:06:09',NULL,'2024-02-01 12:06:09',NULL),(3,2,3,0,1,0,0,0,1,'2024-02-01 12:06:09',NULL,'2024-02-01 12:06:09',NULL),(4,2,4,0,1,0,0,0,1,'2024-02-01 12:06:09',NULL,'2024-02-08 10:19:57',NULL),(5,3,1,1,1,0,0,0,1,'2024-02-01 12:19:35',NULL,'2024-02-01 12:19:47',NULL),(6,3,2,0,0,1,0,0,1,'2024-02-01 12:19:35',NULL,'2024-02-01 12:19:47',NULL),(7,3,3,1,0,0,1,0,1,'2024-02-01 12:19:35',NULL,'2024-02-01 12:19:47',NULL),(8,3,4,0,1,0,0,0,1,'2024-02-01 12:19:35',NULL,'2024-02-01 12:19:47',NULL),(9,1,1,1,1,1,1,1,1,'2024-04-18 08:51:11',NULL,'2024-11-08 04:39:26',NULL),(10,1,2,1,1,1,1,1,1,'2024-04-18 08:51:11',NULL,'2024-11-08 04:39:26',NULL),(11,1,3,1,1,1,1,1,1,'2024-04-18 08:51:11',NULL,'2024-11-08 04:39:26',NULL),(12,1,4,1,1,1,1,1,1,'2024-04-18 08:51:11',NULL,'2024-11-08 04:39:26',NULL);

CREATE TABLE `tbl_user_master` (
  `user_id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(500) NOT NULL,
  `password` varchar(255) DEFAULT NULL,
  `name` varchar(500) DEFAULT NULL,
  `contact_number` varchar(15) DEFAULT NULL,
  `email_id` varchar(500) DEFAULT NULL,
  `profile_image_url` longtext,
  `otp` varchar(100) DEFAULT NULL,
  `refreshToken` longtext,
  `isVerified` tinyint DEFAULT '0',
  `isActive` tinyint NOT NULL DEFAULT '1',
  `firstLoginStatus` tinyint DEFAULT '1',
  `createdDate` datetime DEFAULT NULL,
  `updatedDate` datetime DEFAULT NULL,
  `isDeleted` tinyint NOT NULL DEFAULT '0',
  `isSuspended` tinyint DEFAULT '0',
  `createdBy` varchar(200) DEFAULT NULL,
  `updatedBy` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `tbl_user_master`
--

INSERT INTO `tbl_user_master` VALUES (1,'0008564','$Sharda123','Dev Saxena','9520216040','dev.saxena@shardatech.org','profile_pics-1714650671073-backblue.gif','532935','eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpYXQiOjE3MDI2MzcyMDcsImV4cCI6MTcwMjcyMzYwN30.arDqG-3vvT8u4irRdFo379bmSFIzeLxO-p8QLopObBY',2,1,1,NULL,'2023-12-15 16:16:47',1,2,NULL,'1');

CREATE TABLE `tbl_user_role_permission` (
  `PK_user_role_permissionId` int NOT NULL AUTO_INCREMENT,
  `FK_userId` int DEFAULT NULL,
  `FK_RoleId` int DEFAULT NULL,
  `isActive` tinyint DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `created_by` int DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updated_by` int DEFAULT NULL,
  PRIMARY KEY (`PK_user_role_permissionId`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4;

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

INSERT INTO `tbl_user_role_permission` VALUES (1,1,2,0,'2024-02-01 12:27:56',NULL,'2024-02-01 12:32:09',NULL),(2,1,1,1,'2024-02-01 12:27:56',NULL,'2024-02-01 12:27:56',NULL),(3,1,3,0,'2024-02-01 12:30:57',NULL,'2024-02-01 12:32:09',NULL);
