-- Host: db-master-8.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=17239;

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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=1814;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$YzHQDy3cDJLB.YXBq8Dm6k3Z4K7UfouGynk7q7E0IOl2cg.8lkitY','user','ak_1932246551aab49a','2023-07-02 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$K6Hkb/zXOsNwWW6.BeEvN3mwOXk/SjzQWVFSEdpphG/NPZ.rdul4K','user','ak_db3001e41ac31ff1','2023-04-27 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$0AVRSa6kYLGG2A.EoTQncKEFBvmHYFTK8CMScjA9LlAm0MCDYNSZj','admin','ak_38ebd11af94d6931','2023-02-03 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$QE8DyqUOtQHDs1U01l1n.huCd92yGAlCpQ5q6BHcMh6luPqHc0yW4','admin','ak_799d57c23ed330b9','2023-07-02 10:02:00',NULL);

