--
-- Host: localhost    Database: surveillance_db
-- ------------------------------------------------------


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `clearance_level` int(11) DEFAULT '1',
  `last_login` datetime DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES
(1,'admin','$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi','admin@node3.internal',5,'2023-11-17 03:17:00','2020-01-01 00:00:00'),
(2,'operator7','$2y$10$TKh8H1.PfQx37YgCzwiKb.KjNyWgaHb9cbcoQgdIVFlYg7B77UdFm','op7@node3.internal',3,'2023-11-16 14:22:00','2020-03-15 00:00:00'),
(3,'tech5','$2y$10$xHzXCf4h.Ks1p8B7.xzQA.0O4EQC0mYp8QZpJZf8Qzp9HhKfQx8a','tech5@node3.internal',2,'2023-11-15 09:45:00','2020-05-22 00:00:00');

--
-- Table structure for table `subjects`
--

CREATE TABLE `subjects` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_id` varchar(20) NOT NULL,
  `status` enum('active','inactive','terminated') DEFAULT 'active',
  `sync_node` int(11) DEFAULT NULL,
  `last_sync` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

