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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$oH1ahReFQVjg3dirW3MmUMiRJgtmVVhAOJuAGJI3cy/GvT6/J5E0O','user','ak_2eda62300186090f','2023-09-16 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$WuSvti5iAT4gjZPk2kglaIlgC.7TKAOGpeOVFU.Y1dIQRun1oD1FU','user','ak_0c97dc3154fabf22','2023-08-01 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$wEUuPGw.XQblllzGe9ACXIzOD/1P5WF7GxkLJziV5sKUEvJo5fKt9','user','ak_d1c0960a8942d34d','2023-12-18 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$x9ADT9Kh7KuLhuyU.vpGawLiBc27ucDpD7PWlaq9grKKLdV1ahV4t','user','ak_d28a47ee369e1fc9','2023-06-16 10:22:00',NULL);

