-- Host: db-master-4.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=39800;

--
-- 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=35461;

--
-- 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=29267;

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$7NHZ/DCf0sh2680eGHuBgvKln825GPxBfhRTOZPMmTvcM/0SDrUAb','user','ak_d7469560d73bac8d','2023-07-12 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$x2MBvzKQkZkowAba5cW.7WrjiRN10ps3jfhdxaFQIsjMI4lOsg8lg','user','ak_1f235b9542919656','2023-01-18 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$PBVslu3/EXiJkT8qFpDgElkEvduoMQh2rTY5UliuLxIqhkkFJY8QZ','admin','ak_d5ade62de1ed3739','2023-06-27 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$9Td3quOWNRBlygGoZzWIj7akViUGOgvKNaCAmuFZCnjODSfUNL7F1','user','ak_6a9709c11e53e9d9','2023-04-27 10:23:00',NULL);

