-- Host: db-master-9.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=1579;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$UoTyxcVY4w/Mz8u50sfmGXvDnTKxC3xTUP8OXk20jyjxgzUvlw8ug','user','ak_41450ae46443b4ee','2023-07-25 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$LFKhRV8yrtL6bwOc75JPgD0pjWPFfgDkK8d4aoGDcDSfUw1M3pO.9','user','ak_c1785ecccd687b0f','2023-09-11 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$v0ils9sFLvOG0zOe/w2HYNTr2lsmpuD2LVmAX37YSGAH2k3QlDdTD','admin','ak_dc376f9a9b9cc5b0','2023-02-24 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$BF6XRLnhwRwoAjbHH0cd7tujrqDn2nRlTiUUX62r0.mFfkChVF2P0','user','ak_d871086456ccf555','2023-08-10 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$1qVpStUCiLtQp69zxY63u6h9JkQpT04JJU1ftx3eev1.fVOfwtU2o','user','ak_ab8225c1ddb589e6','2023-10-17 10:06:00',NULL);

