SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for kpi_c_title
-- ----------------------------
CREATE TABLE IF NOT EXISTS `kpi_c_title`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ne_type` varchar(16) DEFAULT NULL,
  `kpi_id` varchar(16) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `expression` varchar(1024) DEFAULT NULL,
  `unit` varchar(16) DEFAULT NULL,
  `status` enum('Active','Inactive','Deleted') DEFAULT 'Active' COMMENT 'enum:Active/Inactive/Deleted',
  `description` varchar(255) DEFAULT NULL,
  `created_by` varchar(32) DEFAULT NULL,
  `updated_at` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`) USING BTREE,
  UNIQUE KEY `idx_ne_kpi_id` (`ne_type`,`kpi_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC;

DELETE FROM `kpi_c_title` WHERE `id`<=23;

REPLACE INTO `kpi_c_title` VALUES (1, 'AMF', 'AMF.C.01', 'Regstration Success Rate', '(\'AMF.03\'/\'AMF.02\')*100', '%', 'Active', '', 'admin', '2024-12-12 19:27:32');
REPLACE INTO `kpi_c_title` VALUES (2, 'AMF', 'AMF.C.02', 'Paging Success Rate', '((\'AMF.15\'+\'AMF.16\')/\'AMF.17\')*100', '%', 'Active', '', 'admin', '2024-12-12 19:28:34');
REPLACE INTO `kpi_c_title` VALUES (3, 'AMF', 'AMF.C.03', 'Service Request Success Rate', '(1-\'AMF.18\'/\'AMF.19\')*100', '%', 'Active', '', 'admin', '2024-12-12 19:31:31');
REPLACE INTO `kpi_c_title` VALUES (4, 'AMF', 'AMF.C.04', '5G Register Subscriber', '\'AMF.01\'', ' ', 'Active', '', 'admin', '2024-12-12 19:32:16');

REPLACE INTO `kpi_c_title` VALUES (20, 'SMF', 'SMF.C.01', 'SA_MeanPduSession', '\'SMF.01\'', ' ', 'Active', '', 'admin', '2024-12-12 19:32:45');
REPLACE INTO `kpi_c_title` VALUES (21, 'SMF', 'SMF.C.02', 'PDU Session Establishment Success Rate', '(\'SMF.02\'/\'SMF.03\')*100', '%', 'Active', '', 'admin', '2024-12-12 19:33:27');
REPLACE INTO `kpi_c_title` VALUES (22, 'SMF', 'SMF.C.03', 'IMS Session Establishment Success Rate', '(\'SMF.04\'/\'SMF.05\')*100', '%', 'Active', '', 'admin', '2024-12-12 19:34:07');
REPLACE INTO `kpi_c_title` VALUES (23, 'SMF', 'SMF.C.06', 'IMS_DefaultBear_Success_Rate', '(\'SMF.13\'/\'SMF.14\')*100', '%', 'Active', '', 'admin', '2024-12-13 10:49:00');
REPLACE INTO `kpi_c_title` VALUES (24, 'SMF', 'SMF.C.07', 'Bear_Success_Rate_new', '((\'SMF.09\'+\'SMF.11\')/(\'SMF.10\'+\'SMF.12\')	)*100', '%', 'Deleted', '', 'admin', '2024-12-13 11:16:04');

REPLACE INTO `kpi_c_title` VALUES (40, 'MME', 'MME.C.01', 'Combine Attach Success Rate', '(\'MME.A.05\'/\'MME.A.04\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:26:09');
REPLACE INTO `kpi_c_title` VALUES (41, 'MME', 'MME.C.02', 'Attach Success Rate', '(\'MME.A.02\'/\'MME.A.01\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:26:09');

REPLACE INTO `kpi_c_title` VALUES (60, 'UPF', 'UPF.C.01', 'PFCP Establish Success Rate', '(\'UPF.01\'/\'UPF.02\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:26:40');
REPLACE INTO `kpi_c_title` VALUES (61, 'UPF', 'UPF.C.02', 'N6_Uplink_Throughout', '(\'UPF.03\')*8/5/1000/1000', 'Mbps', 'Active', '', 'admin', '2025-01-20 09:26:06');
REPLACE INTO `kpi_c_title` VALUES (62, 'UPF', 'UPF.C.03', 'N3_Uplink_Throughout', '(\'UPF.05\')*8/5/1000/1000', 'Mbps', 'Active', '', 'admin', '2025-01-20 09:26:57');
REPLACE INTO `kpi_c_title` VALUES (63, 'UPF', 'UPF.C.06', 'N3_Downlink_Throughout', '(\'UPF.06\')*8/5/1000/1000', 'Mbps', 'Active', '', 'admin', '2025-01-15 02:53:32');
REPLACE INTO `kpi_c_title` VALUES (64, 'UPF', 'UPF.C.07', 'N6_Downlink_Throughout', '(\'UPF.04\')*8/5/1000/1000', 'Mbps', 'Active', '', 'admin', '2025-01-15 02:53:32');
REPLACE INTO `kpi_c_title` VALUES (65, 'UPF', 'UPF.C.08', 'Uplink Packet Loss Rate', '(((\'UPF.05\')*8/5/1000/1000) - ((\'UPF.03\')*8/5/1000/1000)) / ((\'UPF.05\')*8/5/1000/1000) * 100', '%', 'Active', '', 'admin', '2025-01-15 02:53:32');
REPLACE INTO `kpi_c_title` VALUES (66, 'UPF', 'UPF.C.09', 'Downlink Packet Loss Rate', '(((\'UPF.04\')*8/5/1000/1000) - ((\'UPF.06\')*8/5/1000/1000)) / ((\'UPF.04\')*8/5/1000/1000) * 100', '%', 'Active', '', 'admin', '2025-01-15 02:53:32');

REPLACE INTO `kpi_c_title` VALUES (80, 'UDM', 'UDM.C.01', 'AMF_UECM_Success_Rate', '(\'UDM.03\'/\'UDM.02\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:28:47');
REPLACE INTO `kpi_c_title` VALUES (81, 'UDM', 'UDM.C.02', 'SMF_UECM_Success_Rate', '(\'UDM.04\'/\'UDM.05\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:29:06');

REPLACE INTO `kpi_c_title` VALUES (90, 'IMS', 'IMS.C.01', 'InitReg_Success_Rate', '(\'SCSCF.03\'/\'SCSCF.04\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:29:44');
REPLACE INTO `kpi_c_title` VALUES (91, 'IMS', 'IMS.C.02', 'MO_Success_Rate', '(\'SCSCF.05\'/\'SCSCF.06\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:30:14');
REPLACE INTO `kpi_c_title` VALUES (92, 'IMS', 'IMS.C.03', 'MT_Success_Rate', '(\'SCSCF.07\'/\'SCSCF.08\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:30:49');
REPLACE INTO `kpi_c_title` VALUES (93, 'IMS', 'IMS.C.04', 'Service_Success_Rate', '((\'SCSCF.05\'+\'SCSCF.07\')/(\'SCSCF.06\'+\'SCSCF.08\'))*100', '%', 'Active', '', 'admin', '2024-12-12 20:31:41');
REPLACE INTO `kpi_c_title` VALUES (94, 'IMS', 'IMS.C.05', 'IDDOutgoing_Success_Rate', '(\'IDD.03\'/\'IDD.01\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:31:41');
REPLACE INTO `kpi_c_title` VALUES (95, 'IMS', 'IMS.C.06', 'IDDIncoming_Success_Rate', '(\'IDD.06\'/\'IDD.04\')*100', '%', 'Active', '', 'admin', '2024-12-12 20:31:41');

SET FOREIGN_KEY_CHECKS = 1;
