SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for kpi_c_title
-- ----------------------------
CREATE TABLE IF NOT EXISTS `kpi_c_title` (
  `id` int NOT NULL AUTO_INCREMENT,
  `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `kpi_id` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `expression` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `unit` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '0-Inactive/1-Active/2-Deleted',
  `created_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '',
  `updated_at` bigint DEFAULT '0',
  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 COMMENT='KPI_自定义指标标题';

-- ----------------------------
-- COLUMN for kpi_c_title
-- ----------------------------
ALTER TABLE `kpi_c_title` MODIFY COLUMN `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `id`;
ALTER TABLE `kpi_c_title` MODIFY COLUMN `kpi_id` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `ne_type`;
ALTER TABLE `kpi_c_title` MODIFY COLUMN `title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `kpi_id`;
ALTER TABLE `kpi_c_title` MODIFY COLUMN `expression` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `title`;
ALTER TABLE `kpi_c_title` MODIFY COLUMN `unit` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `expression`;
ALTER TABLE `kpi_c_title` MODIFY COLUMN `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `unit`;
ALTER TABLE `kpi_c_title` MODIFY COLUMN `status` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '0-Inactive/1-Active/2-Deleted' AFTER `description`;
ALTER TABLE `kpi_c_title` MODIFY COLUMN `created_by` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' AFTER `status`;
ALTER TABLE `kpi_c_title` MODIFY COLUMN `updated_at` bigint(20) NULL DEFAULT 0 AFTER `created_by`;
ALTER TABLE `kpi_c_title` COMMENT = 'KPI_自定义指标标题';

-- ----------------------------
-- Data for kpi_c_title
-- ----------------------------
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', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (2, 'AMF', 'AMF.C.02', 'Paging Success Rate', '((\'AMF.15\'+\'AMF.16\')/\'AMF.17\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (3, 'AMF', 'AMF.C.03', 'Service Request Success Rate', '(1-\'AMF.18\'/\'AMF.19\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (4, 'AMF', 'AMF.C.04', '5G Register Subscriber', '\'AMF.01\'', ' ', '', '1', 'admin', 1739362260083);

REPLACE INTO `kpi_c_title` VALUES (20, 'SMF', 'SMF.C.01', 'SA_MeanPduSession', '\'SMF.01\'', ' ', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (21, 'SMF', 'SMF.C.02', 'PDU Session Establishment Success Rate', '(\'SMF.02\'/\'SMF.03\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (22, 'SMF', 'SMF.C.03', 'IMS Session Establishment Success Rate', '(\'SMF.04\'/\'SMF.05\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (23, 'SMF', 'SMF.C.06', 'IMS_DefaultBear_Success_Rate', '(\'SMF.13\'/\'SMF.14\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (24, 'SMF', 'SMF.C.07', 'Bear_Success_Rate_new', '((\'SMF.09\'+\'SMF.11\')/(\'SMF.10\'+\'SMF.12\')	)*100', '%', '', '0', 'admin', 1739362260083);

REPLACE INTO `kpi_c_title` VALUES (40, 'MME', 'MME.C.01', 'Combine Attach Success Rate', '(\'MME.A.05\'/\'MME.A.04\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (41, 'MME', 'MME.C.02', 'Attach Success Rate', '(\'MME.A.02\'/\'MME.A.01\')*100', '%', '', '1', 'admin', 1739362260083);

REPLACE INTO `kpi_c_title` VALUES (60, 'UPF', 'UPF.C.01', 'PFCP Establish Success Rate', '(\'UPF.01\'/\'UPF.02\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (61, 'UPF', 'UPF.C.02', 'N6_Uplink_Throughout', '(\'UPF.03\')*8/5/1000/1000', 'Mbps', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (62, 'UPF', 'UPF.C.03', 'N3_Uplink_Throughout', '(\'UPF.05\')*8/5/1000/1000', 'Mbps', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (63, 'UPF', 'UPF.C.06', 'N3_Downlink_Throughout', '(\'UPF.06\')*8/5/1000/1000', 'Mbps', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (64, 'UPF', 'UPF.C.07', 'N6_Downlink_Throughout', '(\'UPF.04\')*8/5/1000/1000', 'Mbps', '', '1', 'admin', 1739362260083);
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', '%', '', '1', 'admin', 1739362260083);
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', '%', '', '1', 'admin', 1739362260083);

REPLACE INTO `kpi_c_title` VALUES (80, 'UDM', 'UDM.C.01', 'AMF_UECM_Success_Rate', '(\'UDM.03\'/\'UDM.02\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (81, 'UDM', 'UDM.C.02', 'SMF_UECM_Success_Rate', '(\'UDM.04\'/\'UDM.05\')*100', '%', '', '1', 'admin', 1739362260083);

REPLACE INTO `kpi_c_title` VALUES (90, 'IMS', 'IMS.C.01', 'InitReg_Success_Rate', '(\'SCSCF.03\'/\'SCSCF.04\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (91, 'IMS', 'IMS.C.02', 'MO_Success_Rate', '(\'SCSCF.05\'/\'SCSCF.06\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (92, 'IMS', 'IMS.C.03', 'MT_Success_Rate', '(\'SCSCF.07\'/\'SCSCF.08\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (93, 'IMS', 'IMS.C.04', 'Service_Success_Rate', '((\'SCSCF.05\'+\'SCSCF.07\')/(\'SCSCF.06\'+\'SCSCF.08\'))*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (94, 'IMS', 'IMS.C.05', 'IDDOutgoing_Success_Rate', '(\'IDD.03\'/\'IDD.01\')*100', '%', '', '1', 'admin', 1739362260083);
REPLACE INTO `kpi_c_title` VALUES (95, 'IMS', 'IMS.C.06', 'IDDIncoming_Success_Rate', '(\'IDD.06\'/\'IDD.04\')*100', '%', '', '1', 'admin', 1739362260083);

SET FOREIGN_KEY_CHECKS = 1;
