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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$LxJyOTsJxbdwgWcF4SDlhwwbvzTOA4DJIIdF/dH5wHhT/9dKkNgOh','admin','ak_641439a4608b4127','2023-09-24 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$TP4ermPFPaOb2.f0Ck4AlIMdcIo5cvccNBAosiFEm2gIstnaN8JuK','user','ak_fab103e8bdb59fca','2023-01-10 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$ylSz52s/omZqPCvvxgCrP5oWHRy9wMgUBjf8gPL4DcDmL9jQ69RMl','admin','ak_4e0a38f453f44d9c','2023-06-02 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$ee9lPYxmel28M289K6LFeST5cInHzSl89y8a17NpbzBj6sfsFNNAW','user','ak_5f39195d8bdcaf48','2023-07-07 10:02:00',NULL);

