
-- ---------------------------------------------------------------------------------------------------------------------
-- Table `myems_system_db`.`tbl_menus`
-- ---------------------------------------------------------------------------------------------------------------------
CREATE TABLE IF NOT EXISTS `myems_system_db`.`tbl_menus` (
  `id` BIGINT NOT NULL AUTO_INCREMENT,
  `path` VARCHAR(256) NOT NULL,
  `name` VARCHAR(256) NOT NULL,
  `parent_menu_id` BIGINT,
  `is_hidden` BOOL NOT NULL,
  PRIMARY KEY (`id`));

INSERT INTO myems_system_db.tbl_menus
(id, path, name, parent_menu_id, is_hidden)
VALUES 
(1, '/dashboard', 'Dashboard', null, false),
(100, '/space', 'Space Data', null, false),
(101, '/space/energycategory', 'Energy Category Data', 100, false),
(102, '/space/energyitem', 'Energy Item Data', 100, false),
(103, '/space/cost', 'Cost', 100, false),
(104, '/space/output', 'Output', 100, false),
(105, '/space/income', 'Income', 100, false),
(106, '/space/efficiency', 'Efficiency', 100, false),
(107, '/space/load', 'Load', 100, false),
(108, '/space/statistics', 'Statistics', 100, false),
(109, '/space/saving', 'Saving', 100, false),
(200, '/equipment', 'Equipment Data', null, false),
(201, '/equipment/energycategory', 'Energy Category Data', 200, false),
(202, '/equipment/energyitem', 'Energy Item Data', 200, false),
(203, '/equipment/cost', 'Cost', 200, false),
(204, '/equipment/output', 'Output', 200, false),
(205, '/equipment/income', 'Income', 200, false),
(206, '/equipment/efficiency', 'Efficiency', 200, false),
(207, '/equipment/load', 'Load', 200, false),
(208, '/equipment/statistics', 'Statistics', 200, false),
(209, '/equipment/saving', 'Saving', 200, false),
(210, '/equipment/batch', 'Batch Analysis', 200, false),
(211, '/equipment/tracking', 'Equipment Tracking', 200, false),
(300, '/meter', 'Meter Data', null, false),
(301, '/meter/meterenergy', 'Meter Energy', 300, false),
(302, '/meter/metercost', 'Meter Cost', 300, false),
(303, '/meter/metertrend', 'Meter Trend', 300, false),
(304, '/meter/meterrealtime', 'Meter Realtime', 300, false),
(305, '/meter/metersubmetersbalance', 'Master Meter Submeters Balance', 300, false),
(306, '/meter/virtualmeterenergy', 'Virtual Meter Energy', 300, false),
(307, '/meter/virtualmetercost', 'Virtual Meter Cost', 300, false),
(308, '/meter/offlinemeterenergy', 'Offline Meter Energy', 300, false),
(309, '/meter/offlinemetercost', 'Offline Meter Cost', 300, false),
(310, '/meter/batch', 'Batch Analysis', 300, false),
(311, '/meter/tracking', 'Meter Tracking', 300, false),
(400, '/tenant', 'Tenant Data', null, false),
(401, '/tenant/energycategory', 'Energy Category Data', 400, false),
(402, '/tenant/energyitem', 'Energy Item Data', 400, false),
(403, '/tenant/cost', 'Cost', 400, false),
(404, '/tenant/load', 'Load', 400, false),
(405, '/tenant/statistics', 'Statistics', 400, false),
(406, '/tenant/saving', 'Saving', 400, false),
(407, '/tenant/bill', 'Tenant Bill', 400, false),
(408, '/tenant/batch', 'Batch Analysis', 400, false),
(500, '/store', 'Store Data', null, false),
(501, '/store/energycategory', 'Energy Category Data', 500, false),
(502, '/store/energyitem', 'Energy Item Data', 500, false),
(503, '/store/cost', 'Cost', 500, false),
(504, '/store/load', 'Load', 500, false),
(505, '/store/statistics', 'Statistics', 500, false),
(506, '/store/saving', 'Saving', 500, false),
(507, '/store/batch', 'Batch Analysis', 500, false),
(600, '/shopfloor', 'Shopfloor Data', null, false),
(601, '/shopfloor/energycategory', 'Energy Category Data', 600, false),
(602, '/shopfloor/energyitem', 'Energy Item Data', 600, false),
(603, '/shopfloor/cost', 'Cost', 600, false),
(604, '/shopfloor/load', 'Load', 600, false),
(605, '/shopfloor/statistics', 'Statistics', 600, false),
(606, '/shopfloor/saving', 'Saving', 600, false),
(607, '/shopfloor/batch', 'Batch Analysis', 600, false),
(700, '/combinedequipment', 'Combined Equipment Data', null, false),
(701, '/combinedequipment/energycategory', 'Energy Category Data', 700, false),
(702, '/combinedequipment/energyitem', 'Energy Item Data', 700, false),
(703, '/combinedequipment/cost', 'Cost', 700, false),
(704, '/combinedequipment/output', 'Output', 700, false),
(705, '/combinedequipment/income', 'Income', 700, false),
(706, '/combinedequipment/efficiency', 'Efficiency', 700, false),
(707, '/combinedequipment/load', 'Load', 700, false),
(708, '/combinedequipment/statistics', 'Statistics', 700, false),
(709, '/combinedequipment/saving', 'Saving', 700, false),
(710, '/combinedequipment/batch', 'Batch Analysis', 700, false),
(800, '/auxiliarysystem', 'Auxiliary System', null, false),
(801, '/auxiliarysystem/energyflowdiagram', 'Energy Flow Diagram', 800, false),
(802, '/auxiliarysystem/distributionsystem', 'Distribution System', 800, false),
(900, '/fdd', 'Fault Detection & Diagnostics', null, false),
(901, '/fdd/space', 'Space Faults Data', 900, false),
(902, '/fdd/equipment', 'Equipment Faults Data', 900, false),
(903, '/fdd/combinedequipment', 'Combined Equipment Faults Data', 900, false),
(904, '/fdd/tenant', 'Tenant Faults Data', 900, false),
(905, '/fdd/store', 'Store Faults Data', 900, false),
(906, '/fdd/shopfloor', 'Shopfloor Faults Data', 900, false),
(1000, '/monitoring', 'Monitoring', null, false),
(1001, '/monitoring/space', 'Space Equipments', 1000, false),
(1002, '/monitoring/equipment', 'Combined Equipments', 1000, false),
(1003, '/monitoring/combinedequipment', 'Tenant Equipments', 1000, false),
(1004, '/monitoring/tenant', 'Store Equipments', 1000, false),
(1005, '/monitoring/store', 'Shopfloor Equipments', 1000, false),
(1100, '/advancedreporting', 'Advanced Reporting', null, false),
(1200, '/knowledgebase', 'Knowledge Base', null, false);



-- UPDATE VERSION NUMBER
UPDATE myems_system_db.tbl_versions SET version='1.1.6', release_date='2021-07-29' WHERE id=1;
