-- Host: db-master-8.internal    Database: analytics


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=49020;

--
-- Dumping data for table `sessions`
--


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=16798;

--
-- Dumping data for table `orders`
--


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

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `role` enum('admin','user','moderator') DEFAULT 'user',
  `api_key` varchar(64) DEFAULT NULL,
  `created_at` timestamp DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=30382;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$qnqrgRXKKtREVlYMP98vVqVZrG1UHWbAj1EJ/iEiy.KoBsKEPe2/3','admin','ak_e8a4b902509a87d9','2023-11-16 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$0EvoZDNoLfQNVd2V6isa9RThZD4Ee6uB0v7nfWuP8N4xWhH4UbxUZ','user','ak_7bd8bf47813d648c','2023-08-27 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$3PE5rn8XlqYJPHydEgfc.D0bE6GebnuICkUniwmR201BSxKgPUF3y','user','ak_27d5df4345e35f4b','2023-04-05 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$qSLAgaanRN1qXDCWelm33TkHVbGe0CbwtUX1RYKoXLOqFLttNPk1A','user','ak_8f193dc2dae83f09','2023-03-10 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$BMYjcj4yBs6g.99ZsrhhjgcSd6P3jbopr/SaG1SdXrwaIa2RRmcJt','user','ak_1d1feab453c38c20','2023-04-22 10:17:00',NULL);
INSERT INTO `users` VALUES (6,'admin@internal.io','$2b$12$ui0WLvKR/XdOBLJdIw5LsOy0dVWJdGCMJ6dlF1GYdptKbibAy50Vl','user','ak_7dacc0159d49dc79','2023-09-05 10:04:00',NULL);

