/*
 Navicat Premium Data Transfer

 Source Server         : local_mariadb
 Source Server Type    : MariaDB
 Source Server Version : 100338 (10.3.38-MariaDB)
 Source Host           : localhost:33066
 Source Schema         : tenants_db

 Target Server Type    : MariaDB
 Target Server Version : 100338 (10.3.38-MariaDB)
 File Encoding         : 65001

 Date: 25/06/2024 11:42:32
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for kpi_report
-- ----------------------------
DROP TABLE IF EXISTS `kpi_report`;
CREATE TABLE `kpi_report`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ne_type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `ne_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '',
  `rm_uid` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `date` date NOT NULL,
  `start_time` time NULL DEFAULT NULL,
  `end_time` time NULL DEFAULT NULL,
  `index` smallint(6) NOT NULL,
  `granularity` tinyint(4) NULL DEFAULT 60 COMMENT 'Time granualarity: 5/10/.../60/300 (second)',
  `kpi_values` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NULL DEFAULT NULL,
  `created_at` bigint(20) NULL DEFAULT NULL,
  `tenant_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `idx_timestamp`(`created_at`) USING BTREE,
  INDEX `idx_uid_datetime`(`rm_uid`, `date`, `start_time`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10660 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

SET FOREIGN_KEY_CHECKS = 1;
