-- --------------------------------------------------------
-- Host:                         153.92.1.116
-- Server version:               8.0.45-0ubuntu0.22.04.1 - (Ubuntu)
-- Server OS:                    Linux
-- HeidiSQL Version:             12.17.0.7270
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


-- Dumping database structure for ke_user_dashboard
CREATE DATABASE IF NOT EXISTS `ke_user_dashboard` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `ke_user_dashboard`;

-- Dumping structure for table ke_user_dashboard.user_logs
CREATE TABLE IF NOT EXISTS `user_logs` (
  `log_id` int NOT NULL AUTO_INCREMENT COMMENT 'unikals log id',
  `user_id` int NOT NULL COMMENT 'lietotaja id no users tabulas',
  `username` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'lietotajvards',
  `action` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'darbiba (created, deleted, renamed utt)',
  `action_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'laiks kad notika darbiba',
  PRIMARY KEY (`log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Parada lietotaja darbibas un to vesturi';

-- Dumping data for table ke_user_dashboard.user_logs: ~9 rows (approximately)
INSERT INTO `user_logs` (`log_id`, `user_id`, `username`, `action`, `action_time`) VALUES
	(24, 16, 'test2', 'created', '2026-04-15 20:35:02'),
	(25, 17, 'test3', 'created', '2026-04-15 20:35:04'),
	(26, 15, 'test', 'set online', '2026-04-15 20:35:47'),
	(27, 17, 'test3', 'set online', '2026-04-15 20:35:51'),
	(28, 15, 'test', 'set offline', '2026-04-15 20:40:28'),
	(29, 18, 'a', 'created', '2026-04-16 18:50:13'),
	(30, 18, 'a', 'deleted', '2026-04-16 18:50:21'),
	(31, 15, 'test', 'set online', '2026-04-16 18:54:17'),
	(32, 15, 'test', 'set offline', '2026-04-16 18:54:23');

-- Dumping structure for table ke_user_dashboard.users
CREATE TABLE IF NOT EXISTS `users` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT 'unikals lietotaja id',
  `username` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'lietotajvards',
  `online` tinyint(1) DEFAULT '0' COMMENT '0 = offline, 1 = online',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Parada visus lietotajus ka ari to statusu';

-- Dumping data for table ke_user_dashboard.users: ~3 rows (approximately)
INSERT INTO `users` (`id`, `username`, `online`) VALUES
	(15, 'test', 0),
	(16, 'test2', 0),
	(17, 'test3', 1);

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
