-- entwatchban_web.EntWatch_Current_Eban definition

CREATE TABLE `EntWatch_Current_Eban` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `client_name` varchar(32) NOT NULL,
  `client_steamid` varchar(64) NOT NULL,
  `admin_name` varchar(32) NOT NULL,
  `admin_steamid` varchar(64) NOT NULL,
  `duration` int(10) unsigned NOT NULL,
  `time_stamp_start` datetime DEFAULT current_timestamp(),
  `reason` varchar(64) DEFAULT NULL,
  `reason_unban` varchar(64) DEFAULT NULL,
  `admin_name_unban` varchar(32) DEFAULT NULL,
  `admin_steamid_unban` varchar(64) DEFAULT NULL,
  `timestamp_unban` int(11) DEFAULT NULL,
  `time_played_start` int(11) NOT NULL DEFAULT -1,
  `time_played_end` int(11) NOT NULL DEFAULT -1,
  `is_expired` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `idx_steamid_search` (`client_steamid`,`admin_steamid`),
  KEY `idx_expiry_sort` (`time_stamp_start`,`duration`),
  KEY `idx_server_expiry` (`duration`,`time_stamp_start`),
  KEY `idx_is_expired` (`is_expired`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;


-- entwatchban_web.web_logs definition

CREATE TABLE `web_logs` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `message` varchar(255) NOT NULL,
  `admin_name` varchar(32) NOT NULL,
  `admin_steamid` varchar(64) NOT NULL,
  `client_name` varchar(32) NOT NULL,
  `client_steamid` varchar(64) NOT NULL,
  `time_stamp` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
