--
-- Host: localhost    Database: leantime
-- ------------------------------------------------------


--
-- Table structure for table `zp_action_tabs`
--

CREATE TABLE `zp_action_tabs` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `action` text COLLATE utf8mb4_unicode_ci,
  `tab` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `tabRights` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_action_tabs`
--


--
-- Table structure for table `zp_audit`
--

CREATE TABLE `zp_audit` (
  `id` int NOT NULL AUTO_INCREMENT,
  `userId` int DEFAULT NULL,
  `projectId` int DEFAULT NULL,
  `action` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entity` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `entityId` int DEFAULT NULL,
  `values` text COLLATE utf8mb4_unicode_ci,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `projectId` (`projectId`),
  KEY `projectAction` (`projectId`,`action`),
  KEY `projectEntityEntityId` (`projectId`,`entity`,`entityId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_audit`
--


--
-- Table structure for table `zp_calendar`
--

CREATE TABLE `zp_calendar` (
  `id` int NOT NULL AUTO_INCREMENT,
  `userId` int DEFAULT NULL,
  `dateFrom` datetime DEFAULT NULL,
  `dateTo` datetime DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `kind` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `allDay` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_calendar`
--


--
-- Table structure for table `zp_canvas`
--

CREATE TABLE `zp_canvas` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `author` int DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `projectId` int DEFAULT NULL,
  `type` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ProjectIdType` (`projectId`,`type`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_canvas`
--

INSERT INTO `zp_canvas` VALUES (1,'Lean Canvas',1,'2015-11-13 13:03:46',3,'leancanvas'),(2,'Vendbox Backoffice',1,'2022-07-25 10:56:46',4,'idea');

--
-- Table structure for table `zp_canvas_items`
--

CREATE TABLE `zp_canvas_items` (
  `id` int NOT NULL AUTO_INCREMENT,
  `description` text COLLATE utf8mb4_unicode_ci,
  `assumptions` text COLLATE utf8mb4_unicode_ci,
  `data` text COLLATE utf8mb4_unicode_ci,
  `conclusion` text COLLATE utf8mb4_unicode_ci,
  `box` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `author` int DEFAULT NULL,
  `created` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  `canvasId` int DEFAULT NULL,
  `sortindex` int DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `milestoneId` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_canvas_items`
--

INSERT INTO `zp_canvas_items` VALUES (1,'Database architecture to support multitenant','','<p>Changing the database approach to have various separated schemas for different clients to ensure confidentiality of data and scalability.&nbsp;</p>\r\n<p>The above idea was raised by William and is meant to be explored if feasible and what would be the benefits on adopting that approach and risks of maintaining the current approach that we currently have.</p>\r\n<p>&nbsp;</p>','','idea',1,'2022-07-25 12:39:46','2022-07-25 12:39:46',2,NULL,'idea','');

--
-- Table structure for table `zp_clients`
--

CREATE TABLE `zp_clients` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `street` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `zip` int DEFAULT NULL,
  `city` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `state` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `country` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `internet` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `published` int DEFAULT NULL,
  `age` int DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_clients`
--

INSERT INTO `zp_clients` VALUES (1,'Truebits Technologies','',0,'','','','','',NULL,NULL,'');

--
-- Table structure for table `zp_comment`
--

CREATE TABLE `zp_comment` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `module` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `userId` int DEFAULT NULL,
  `commentParent` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `moduleId` int DEFAULT NULL,
  `text` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_comment`
--

INSERT INTO `zp_comment` VALUES (1,'ticket',1,0,'2022-07-24 16:27:03',10,'Development of the Items module which will be used for Inventory management and the core management point of all items and services.');

--
-- Table structure for table `zp_dashboard_widgets`
--

CREATE TABLE `zp_dashboard_widgets` (
  `id` int NOT NULL AUTO_INCREMENT,
  `value` text CHARACTER SET latin1 COLLATE latin1_swedish_ci,
  `user_id` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_dashboard_widgets`
--


--
-- Table structure for table `zp_file`
--

CREATE TABLE `zp_file` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `module` enum('project','ticket','client','user','lead','export','private') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `moduleId` int DEFAULT NULL,
  `userId` int DEFAULT NULL,
  `extension` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `encName` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `realName` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_file`
--


--
-- Table structure for table `zp_gcallinks`
--

CREATE TABLE `zp_gcallinks` (
  `id` int NOT NULL AUTO_INCREMENT,
  `userId` int DEFAULT NULL,
  `url` text COLLATE utf8mb4_unicode_ci,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `colorClass` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_gcallinks`
--


--
-- Table structure for table `zp_lead`
--

CREATE TABLE `zp_lead` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('lead','opportunity','client') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `refSource` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `refValue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `potentialMoney` int DEFAULT NULL,
  `actualMoney` int DEFAULT NULL,
  `clientId` int DEFAULT NULL,
  `proposal` text COLLATE utf8mb4_unicode_ci,
  `creatorId` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_lead`
--


--
-- Table structure for table `zp_message`
--

CREATE TABLE `zp_message` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `to_id` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `from_id` int DEFAULT NULL,
  `parent_id` int DEFAULT NULL,
  `subject` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `content` text COLLATE utf8mb4_unicode_ci,
  `date_sent` datetime DEFAULT NULL,
  `last_message` int DEFAULT '0',
  `read` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_message`
--


--
-- Table structure for table `zp_modulerights`
--

CREATE TABLE `zp_modulerights` (
  `id` int NOT NULL AUTO_INCREMENT,
  `module` text,
  `roleIds` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=49739 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `zp_modulerights`
--

INSERT INTO `zp_modulerights` VALUES (49660,'calendar/class.addEvent.php','2,4,5,3'),(49661,'calendar/class.delEvent.php','2,4,5,3'),(49662,'calendar/class.delGCal.php','2,4,5,3'),(49663,'calendar/class.editEvent.php','2,4,5,3'),(49664,'calendar/class.editGCal.php','2,4,5,3'),(49665,'calendar/class.importGCal.php','2,4,5,3'),(49666,'calendar/class.showAllGCals.php','2,4,5,3'),(49667,'calendar/class.showMyCalendar.php','2,4,5,3'),(49668,'clients/class.delClient.php','2'),(49669,'clients/class.editClient.php','2'),(49670,'clients/class.newClient.php','2'),(49671,'clients/class.showAll.php','2'),(49672,'clients/class.showClient.php','2'),(49673,'comments/class.showAll.php','2,4,5,3'),(49674,'dashboard/class.addWidget.php','2,4,5'),(49675,'dashboard/class.show.php','2,4,5,3'),(49676,'dashboard/class.widgets.php','2,4,5,3'),(49677,'files/class.showAll.php','2,4,5,3'),(49678,'general/class.footer.php','2'),(49679,'general/class.header.php','2'),(49680,'general/class.main.php','2'),(49681,'general/class.menu.php','2'),(49682,'general/class.showMenu.php','2'),(49683,'leads/class.addLead.php','2,5'),(49684,'leads/class.addLeadContact.php','2,5'),(49685,'leads/class.addReferralSource.php','2,5'),(49686,'leads/class.convertToUser.php','2,5'),(49687,'leads/class.deleteLead.php','2,5'),(49688,'leads/class.editLead.php','2,5'),(49689,'leads/class.showAll.php','2,5'),(49690,'leads/class.showLead.php','2,5'),(49691,'leads/class.statistics.php','2,5'),(49692,'leancanvas/class.delCanvas.php','2,4,5'),(49693,'leancanvas/class.delCanvasItem.php','2,4,5'),(49694,'leancanvas/class.showCanvas.php','2,4,5'),(49695,'messages/class.compose.php','2,4,5,3'),(49696,'messages/class.showAll.php','2,4,5,3'),(49697,'projects/class.delProject.php','2,4,5,3'),(49698,'projects/class.editAccount.php','2,4,5,3'),(49699,'projects/class.editProject.php','2,4,5'),(49700,'projects/class.newProject.php','2,4,5'),(49701,'projects/class.showAll.php','2,4,5,3'),(49702,'projects/class.showProject.php','2,4,5,3'),(49703,'setting/class.addMenu.php','2'),(49704,'setting/class.delMenu.php','2'),(49705,'setting/class.delRole.php','2'),(49706,'setting/class.delSystemOrg.php','2'),(49707,'setting/class.editMenu.php','2'),(49708,'setting/class.editRole.php','2'),(49709,'setting/class.editSettings.php','2'),(49710,'setting/class.editSystemOrg.php','2'),(49711,'setting/class.editTabRights.php','2'),(49712,'setting/class.menuUser.php','2'),(49713,'setting/class.newRole.php','2'),(49714,'setting/class.newSystemOrg.php','2'),(49715,'setting/class.setModuleRights.php','2'),(49716,'setting/class.showAllMenu.php','2'),(49717,'setting/class.showAllRoles.php','2'),(49718,'setting/class.showAllSubmodules.php','2'),(49719,'setting/class.showAllSystemOrg.php','2'),(49720,'setting/class.userMenu.php','2'),(49721,'tickets/class.delTicket.php','2,5'),(49722,'tickets/class.editTicket.php','2,4,5,3'),(49723,'tickets/class.newTicket.php','2,4,5,3'),(49724,'tickets/class.showAll.php','2,4,5,3'),(49725,'tickets/class.showKanban.php','2,4,5,3'),(49726,'tickets/class.showMy.php','2,4,5,3'),(49727,'tickets/class.showTicket.php','2,4,5,3'),(49728,'timesheets/class.addTime.php','2,4,5'),(49729,'timesheets/class.delTime.php','2,4,5'),(49730,'timesheets/class.editTime.php','2,4,5'),(49731,'timesheets/class.showAll.php','2,5'),(49732,'timesheets/class.showMy.php','2,4,5'),(49733,'users/class.delUser.php','2'),(49734,'users/class.editOwn.php','2,4,5,3'),(49735,'users/class.editUser.php','2'),(49736,'users/class.newUser.php','2'),(49737,'users/class.showAll.php','2'),(49738,'users/class.showUser.php','2,3');

--
-- Table structure for table `zp_note`
--

CREATE TABLE `zp_note` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `userId` int DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_note`
--


--
-- Table structure for table `zp_projects`
--

CREATE TABLE `zp_projects` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `clientId` int DEFAULT NULL,
  `details` text COLLATE utf8mb4_unicode_ci,
  `state` int DEFAULT NULL,
  `hourBudget` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dollarBudget` int DEFAULT NULL,
  `active` int DEFAULT NULL,
  `psettings` mediumtext COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_projects`
--

INSERT INTO `zp_projects` VALUES (3,'Leantime Onboarding',1,'<p>This is you first project to get you started</p>',0,'0',0,NULL,NULL),(4,'Vendbox',1,'<p>Vendbox is an integrated Point of Sales System that will meet the needs of various industries including retail and wholesale. The system is design to be both scalable and simplified to address different business logics. The main aim of this solution is to solve the merchant\'s problem.&nbsp;</p>\r\n<p><strong>The Merchant\'s Problem</strong></p>\r\n<p>A highlevel observation of local merchant shows that these individuals require multiple hardware and software to manage their businesses effectively. These include Bank POS for Payment, Local POS for business transation entry and a TRA Fiscal Device for compliance. Vendbox sets to sort this particular problem by integrating all the above hardware into one and adding value by providing furthe business end logics.&nbsp;</p>\r\n<p><strong>Solution Architechture</strong></p>\r\n<p>Vendbox will have a backend webadmin portal and and front end android mobile application.</p>',NULL,'0',0,NULL,NULL);

--
-- Table structure for table `zp_punch_clock`
--

CREATE TABLE `zp_punch_clock` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `userId` int NOT NULL,
  `minutes` int DEFAULT NULL,
  `hours` int DEFAULT NULL,
  `punchIn` int DEFAULT NULL,
  PRIMARY KEY (`id`,`userId`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_punch_clock`
--


--
-- Table structure for table `zp_read`
--

CREATE TABLE `zp_read` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `module` enum('ticket','message') COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `moduleId` int DEFAULT NULL,
  `userId` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_read`
--


--
-- Table structure for table `zp_relationuserproject`
--

CREATE TABLE `zp_relationuserproject` (
  `id` int NOT NULL AUTO_INCREMENT,
  `userId` int DEFAULT NULL,
  `projectId` int DEFAULT NULL,
  `wage` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_relationuserproject`
--

INSERT INTO `zp_relationuserproject` VALUES (7,19,3,NULL),(8,18,3,NULL),(9,20,3,NULL),(10,1,4,NULL),(11,1,4,NULL),(12,2,4,NULL),(13,3,4,NULL),(14,4,4,NULL);

--
-- Table structure for table `zp_roles`
--

CREATE TABLE `zp_roles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `roleName` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `roleDescription` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sysOrg` int DEFAULT NULL,
  `template` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_roles`
--

INSERT INTO `zp_roles` VALUES (2,'admin','Administrators',14,'zypro'),(3,'user','Clients',14,'zypro'),(4,'developer','Developer',14,'zypro'),(5,'manager','Manager',14,'zypro');

--
-- Table structure for table `zp_sprints`
--

CREATE TABLE `zp_sprints` (
  `id` int NOT NULL AUTO_INCREMENT,
  `projectId` int DEFAULT NULL,
  `name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `startDate` datetime DEFAULT NULL,
  `endDate` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_sprints`
--

INSERT INTO `zp_sprints` VALUES (1,4,'Sprint 3','2022-07-25 00:00:00','2022-07-29 00:00:00');

--
-- Table structure for table `zp_stats`
--

CREATE TABLE `zp_stats` (
  `sprintId` int DEFAULT NULL,
  `projectId` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `sum_todos` int DEFAULT NULL,
  `sum_open_todos` int DEFAULT NULL,
  `sum_progres_todos` int DEFAULT NULL,
  `sum_closed_todos` int DEFAULT NULL,
  `sum_planned_hours` float DEFAULT NULL,
  `sum_estremaining_hours` float DEFAULT NULL,
  `sum_logged_hours` float DEFAULT NULL,
  `sum_points` int DEFAULT NULL,
  `sum_points_done` int DEFAULT NULL,
  `sum_points_progress` int DEFAULT NULL,
  `sum_points_open` int DEFAULT NULL,
  `sum_todos_xs` int DEFAULT NULL,
  `sum_todos_s` int DEFAULT NULL,
  `sum_todos_m` int DEFAULT NULL,
  `sum_todos_l` int DEFAULT NULL,
  `sum_todos_xl` int DEFAULT NULL,
  `sum_todos_xxl` int DEFAULT NULL,
  `sum_todos_none` int DEFAULT NULL,
  `tickets` text COLLATE utf8mb4_unicode_ci,
  `daily_avg_hours_booked_todo` float DEFAULT NULL,
  `daily_avg_hours_booked_point` float DEFAULT NULL,
  `daily_avg_hours_planned_todo` float DEFAULT NULL,
  `daily_avg_hours_planned_point` float DEFAULT NULL,
  `daily_avg_hours_remaining_point` float DEFAULT NULL,
  `daily_avg_hours_remaining_todo` float DEFAULT NULL,
  `sum_teammembers` int DEFAULT NULL,
  KEY `projectId` (`projectId`,`sprintId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_stats`
--

INSERT INTO `zp_stats` VALUES (-1,3,'2022-07-23 00:00:00',1,1,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0,0,1,'9',NULL,NULL,0,NULL,NULL,0,1),(-1,4,'2022-07-24 00:00:00',1,0,1,0,0,0,NULL,5,0,5,0,0,0,0,1,0,0,0,'12',NULL,NULL,0,0,0,0,3),(1,4,'2022-07-25 00:00:00',6,5,1,0,41,0,NULL,22,0,5,17,0,2,1,3,0,0,0,'12,13,16,17,18,19',NULL,NULL,6.83333,1.86364,0,0,3),(-1,4,'2022-07-25 00:00:00',8,7,1,0,41,0,NULL,26,0,5,21,0,4,1,3,0,0,0,'12,13,14,15,16,17,18,19',NULL,NULL,5.125,1.57692,0,0,3),(1,4,'2022-07-26 00:00:00',6,4,2,0,41,0,16,22,0,10,12,0,2,1,3,0,0,0,'12,13,16,17,18,19',2.66667,0.727273,6.83333,1.86364,0,0,3),(-1,4,'2022-07-26 00:00:00',8,6,2,0,41,0,16,26,0,10,16,0,4,1,3,0,0,0,'12,13,14,15,16,17,18,19',2,0.615385,5.125,1.57692,0,0,3);

--
-- Table structure for table `zp_submodulerights`
--

CREATE TABLE `zp_submodulerights` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `alias` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `title` varchar(155) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `module` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `submodule` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `roleIds` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_submodulerights`
--

INSERT INTO `zp_submodulerights` VALUES (1,'comments-generalComment','COMMENTS','comments','generalComment.sub.php','2,4,5,3'),(2,'dashboard-calendar','CALENDAR','dashboard','calendar.sub.php','2,4,5,3'),(3,'dashboard-escalatingTickets','ESCALATING_TICKETS','dashboard','escalatingTickets.sub.php','2,4,5'),(4,'dashboard-hotLeads','HOT_LEADS','dashboard','hotLeads.sub.php','2,4,5'),(5,'dashboard-myHours','MY_HOURS','dashboard','myHours.sub.php','2,4,5'),(6,'dashboard-myProjects','MY_PROJECTS','dashboard','myProjects.sub.php','2,4,5'),(7,'dashboard-myTickets','MY_TICKETS','dashboard','myTickets.sub.php','2,4,5,3'),(8,'dashboard-notes','NOTES','dashboard','notes.sub.php','2,4,5,3'),(9,'dashboard-projectsProgress','PROJECT_PROGRESS','dashboard','projectsProgress.sub.php','2,4,5,3'),(10,'dashboard-statistics','STATISTICS','dashboard','statistics.sub.php','2,4,5'),(11,'dashboard-supportInfo','SUPPORT_INFO','dashboard','supportInfo.sub.php','2,4,5,3'),(12,'dashboard-timeTracker','','dashboard','timeTracker.sub.php','2,4,5'),(13,'projects-budgeting','BUDGETING','projects','budgeting.sub.php','2,5'),(14,'projects-tickets','TICKETS','projects','tickets.sub.php','2,4,5,3'),(15,'projects-timeline','TIMELINE','projects','timeline.sub.php','2,4,5,3'),(16,'projects-timesheet','TIMESHEET','projects','timesheet.sub.php','2,4,5'),(17,'tickets-assignUsers','ASSIGN_USERS','tickets','assignUsers.sub.php',NULL),(18,'tickets-attachments','FILES','tickets','attachments.sub.php','2,4,5,3'),(19,'tickets-comments','COMMENTS','tickets','comments.sub.php','2,4,5,3'),(20,'tickets-technicalDetails','TECHNICAL_DETAILS','tickets','technicalDetails.sub.php','2,4,5,3'),(21,'tickets-ticketDetails','TICKET_DETAILS','tickets','ticketDetails.sub.php','2,4,5,3'),(22,'tickets-ticketHistory','TICKET_HISTORY','tickets','ticketHistory.sub.php','2,4,5'),(23,'tickets-timesheet','TIMESHEET','tickets','timesheet.sub.php','2,4,5'),(24,'tickets-subTasks','SUBTASKS','tickets','subTasks.sub.php','2,4,5,3');

--
-- Table structure for table `zp_tickethistory`
--

CREATE TABLE `zp_tickethistory` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `userId` int DEFAULT NULL,
  `ticketId` int DEFAULT NULL,
  `changeType` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `changeValue` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dateModified` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_tickethistory`
--

INSERT INTO `zp_tickethistory` VALUES (1,1,12,'planHours','8','2022-07-25 10:12:15'),(2,1,12,'status','3','2022-07-25 10:48:19'),(3,1,16,'status','3','2022-07-25 14:21:55'),(4,1,12,'status','4','2022-07-25 14:22:00'),(5,1,20,'planHours','16','2022-07-25 14:27:05'),(6,1,20,'fromDate','2022-07-26 00:00:00','2022-07-25 14:27:43'),(7,1,20,'toDate','2022-07-27 00:00:00','2022-07-25 14:27:43'),(8,2,12,'status','2','2022-07-26 14:04:33'),(9,2,17,'status','4','2022-07-26 14:13:44'),(10,2,12,'fromDate','2022-07-25 00:00:00','2022-07-26 14:16:45'),(11,2,12,'toDate','2022-07-27 00:00:00','2022-07-26 14:16:45'),(12,1,12,'toDate','2022-07-26 00:00:00','2022-07-26 17:11:22'),(13,1,12,'status','0','2022-07-26 17:11:58'),(14,1,12,'status','2','2022-07-26 17:12:49'),(15,2,17,'status','2','2022-07-27 15:45:11'),(16,1,12,'deadline','2022-07-26 00:00:00','2022-07-27 16:07:43'),(17,1,17,'deadline','2022-07-27 00:00:00','2022-07-27 16:08:24');

--
-- Table structure for table `zp_tickets`
--

CREATE TABLE `zp_tickets` (
  `id` int NOT NULL AUTO_INCREMENT,
  `projectId` int DEFAULT NULL,
  `headline` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `acceptanceCriteria` text COLLATE utf8mb4_unicode_ci,
  `date` datetime DEFAULT NULL,
  `dateToFinish` datetime DEFAULT NULL,
  `priority` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` int DEFAULT NULL,
  `userId` int DEFAULT NULL,
  `os` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `browser` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `resolution` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `component` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `version` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `url` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dependingTicketId` int DEFAULT NULL,
  `editFrom` datetime DEFAULT NULL,
  `editTo` datetime DEFAULT NULL,
  `editorId` varchar(75) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `planHours` float DEFAULT NULL,
  `hourRemaining` float DEFAULT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `production` int DEFAULT '0',
  `staging` int DEFAULT '0',
  `storypoints` float DEFAULT NULL,
  `sprint` int DEFAULT NULL,
  `sortindex` bigint DEFAULT NULL,
  `kanbanSortIndex` bigint DEFAULT NULL,
  `tags` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `milestoneid` int DEFAULT NULL,
  `leancanvasitemid` int DEFAULT NULL,
  `retrospectiveid` int DEFAULT NULL,
  `ideaid` int DEFAULT NULL,
  `zp_ticketscol` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `ProjectUserId` (`projectId`,`userId`),
  KEY `StatusSprint` (`status`,`sprint`),
  KEY `Sorting` (`sortindex`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_tickets`
--

INSERT INTO `zp_tickets` VALUES (9,3,'Getting Started with Leantime','Look around and make yourself familiar with the system. ','','2015-11-30 00:00:00','1969-12-31 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,'',NULL,NULL,'1969-12-31 00:00:00','1969-12-31 00:00:00','1',0,0,'Story',0,0,0,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL),(10,4,'Items','','','2022-07-24 09:26:12','0000-00-00 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,NULL,NULL,0,'2022-06-29 00:00:00','2022-07-11 00:00:00','1',0,0,'milestone',0,0,0,0,0,0,'#00814A',NULL,NULL,NULL,NULL,NULL),(11,4,'Sales','','','2022-07-25 02:37:20','0000-00-00 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,NULL,NULL,10,'2022-07-15 00:00:00','2022-07-29 00:00:00','1',0,0,'milestone',0,0,0,0,0,0,'#35CB8B',NULL,NULL,NULL,NULL,NULL),(12,4,'Attribute Management','<p>A user should be able to add an attribute to an item. These attributes will be configured in the settings module. One should be to create the attribute name, attribute group (whether decimal,text or dropdown and attribute value will be inputed on the items module</p>','','2022-07-25 03:08:27','2022-07-26 00:00:00',NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,10,'2022-07-25 00:00:00','2022-07-26 00:00:00','2',8,0,'story',0,0,5,1,0,100,'',NULL,NULL,NULL,NULL,NULL),(13,4,'Additional Payment Charges','<p>Add setting for additional charges when creating payment modes. The additional charges can be fixed amount or percentage . The additional charges appearing in the sales screen should appear and be editable in the sales screen. The editing of the additional charges should be managed by permissions.</p>','','2022-07-25 03:15:13','2022-07-29 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,NULL,NULL,11,'0000-00-00 00:00:00','0000-00-00 00:00:00','2',5,0,'story',0,0,3,1,0,300,'',NULL,NULL,NULL,NULL,NULL),(14,4,'Return Policy','<p>Add Return Policy Configuration in Settings - The Return Policy text should appear in all the sales receipts issued.</p>','','2022-07-25 03:17:40','0000-00-00 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,NULL,NULL,11,'0000-00-00 00:00:00','0000-00-00 00:00:00','',0,0,'story',0,0,2,0,0,0,'',NULL,NULL,NULL,NULL,NULL),(15,4,'Items editable details','<p>Max-level, Min-Level and Opening Inventory should be editable again in Items module. Also the Out of Stock, Low Stock and Expired Items sorters should work in Items List</p>','','2022-07-25 03:19:39','0000-00-00 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,NULL,NULL,10,'0000-00-00 00:00:00','0000-00-00 00:00:00','',0,0,'task',0,0,2,0,0,0,'',NULL,NULL,NULL,NULL,NULL),(16,4,'Sales Return','<p>Add Returns (Returns Inward) and its functionality to the Register in Sales. Dont forget to prefix returns with negative (-) . Also Daily Sales Report should have returns as negative sales</p>','','2022-07-25 03:23:09','2022-07-29 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,NULL,NULL,11,'0000-00-00 00:00:00','0000-00-00 00:00:00','2',16,0,'story',0,0,5,1,0,200,'',NULL,NULL,NULL,NULL,NULL),(17,4,'Inventory Tracking and update','<p>Add an Inventory Taking functionality with an icon in items list , where the user will be able to Add/Subtract the Quantity in the stock location after finishing stock taking or inspection</p>','','2022-07-25 03:36:28','2022-07-27 00:00:00',NULL,0,1,NULL,NULL,NULL,NULL,NULL,NULL,10,'0000-00-00 00:00:00','0000-00-00 00:00:00','2',8,0,'story',0,0,5,1,0,0,'',NULL,NULL,NULL,NULL,NULL),(18,4,'Tax breakdown with names','<p>The break down of Taxes should be their names and individuals in all the documents concerned, in sales receipt, Invoices, Orders etc</p>','','2022-07-25 03:44:26','2022-07-29 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,NULL,NULL,11,'0000-00-00 00:00:00','0000-00-00 00:00:00','2',3,0,'task',0,0,2,1,0,100,'',NULL,NULL,NULL,NULL,NULL),(19,4,'Stock movement remarks','<p>Stock movement remarks should show the following , \'Manual Edit of Quantity\' for any updation of quantity. \'Sale\' for sales, \'Returned\' for Returns and more..</p>','','2022-07-25 03:50:07','2022-07-29 00:00:00',NULL,3,1,NULL,NULL,NULL,NULL,NULL,NULL,10,'0000-00-00 00:00:00','0000-00-00 00:00:00','2',1,0,'story',0,0,2,1,0,0,'',NULL,NULL,NULL,NULL,NULL);

--
-- Table structure for table `zp_timesheets`
--

CREATE TABLE `zp_timesheets` (
  `id` int NOT NULL AUTO_INCREMENT,
  `userId` int DEFAULT NULL,
  `ticketId` int DEFAULT NULL,
  `workDate` datetime DEFAULT NULL,
  `hours` float DEFAULT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `kind` varchar(175) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `invoicedEmpl` int DEFAULT NULL,
  `invoicedComp` int DEFAULT NULL,
  `invoicedEmplDate` datetime DEFAULT NULL,
  `invoicedCompDate` datetime DEFAULT NULL,
  `rate` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `Unique` (`userId`,`ticketId`,`workDate`,`kind`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_timesheets`
--

INSERT INTO `zp_timesheets` VALUES (1,1,20,'2022-07-25 00:00:00',8,'','GENERAL_BILLABLE',0,0,'0000-00-00 00:00:00','0000-00-00 00:00:00',''),(5,2,12,'2022-07-25 00:00:00',8,'','DEVELOPMENT',1,1,'2022-07-27 00:00:00','2022-07-27 00:00:00',''),(6,2,12,'2022-07-26 00:00:00',8,'','DEVELOPMENT',1,1,'2022-07-27 00:00:00','2022-07-27 00:00:00',''),(7,2,17,'2022-07-27 00:00:00',8,'','DEVELOPMENT',1,1,'2022-07-27 00:00:00','2022-07-27 00:00:00','');

--
-- Table structure for table `zp_wiki`
--

CREATE TABLE `zp_wiki` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` text COLLATE utf8mb4_unicode_ci,
  `projectId` int DEFAULT NULL,
  `authorId` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_wiki`
--


--
-- Table structure for table `zp_wiki_articles`
--

CREATE TABLE `zp_wiki_articles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `headline` text COLLATE utf8mb4_unicode_ci,
  `text` text COLLATE utf8mb4_unicode_ci,
  `tags` text COLLATE utf8mb4_unicode_ci,
  `authorId` int DEFAULT NULL,
  `category` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `modified` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_wiki_articles`
--


--
-- Table structure for table `zp_wiki_categories`
--

CREATE TABLE `zp_wiki_categories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_wiki_categories`
--


--
-- Table structure for table `zp_wiki_comments`
--

CREATE TABLE `zp_wiki_comments` (
  `id` int NOT NULL AUTO_INCREMENT,
  `text` text COLLATE utf8mb4_unicode_ci,
  `userId` int DEFAULT NULL,
  `articleId` int DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  `commentParent` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `zp_wiki_comments`
--



