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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$Cj2Tqc50loITJa6O2SHL8JlmeM.R/Nu3lI/PV42rwmBuikvau9.o2','admin','ak_31fb4ed730f86688','2023-06-12 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$6UzxGLTEqqZEjQPYoCEKLYm2WpK/lx185hPbfbSW2R0co5GfGsoZC','user','ak_461f53ae2a87da8a','2023-08-20 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$.fwNAGIMgrDtUBimPOOHNoVU/PnKfKRwTY/P/XGmIIGbxAs.ANpPk','user','ak_7ab181627c43647f','2023-01-06 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$rZtTitKV6ZYhtwhiefcS92lflNwALbdWbqR4Rs8WlKA3x5.oVbrk4','user','ak_419bf624f951511b','2023-03-20 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$5ssbwC0zZidhr2DQ2xjoyWHDGhx1osChVwgxlkDXKsjFUIoPRxiPv','admin','ak_a51f4afdcc423283','2023-09-15 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@corp.net','$2b$12$o4Za8b8bsPj01GP9N75wYfYe2ORa7fwoLGy72P2EyjlDQlcF5mv0i','user','ak_8b3b50091d0ed575','2023-09-15 10:23:00',NULL);

