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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$.DIMCoLoRQO1rR1rkapijZis1qNLdW3e0GlruaRbNS0wBx/a2yyIQ','user','ak_447bf5bf6de2fa75','2023-03-02 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$IM/oO40pHo1cZ6WzWeAgGysWziqCKnTclTDVkZqNDnIahmJfSHtJz','user','ak_6173e23d6480ace9','2023-05-01 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$n0RhFbsU7UKI9EpKKDm06X24UqlvCgMorDWDi1o.b3.FUuYfPS7vr','user','ak_cf2bfda92a0f4637','2023-02-10 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$W.22EunhNwIonOTUjYBC2j5XccEuuaGO2gD/oFNGj5ZuLoI81V2zN','admin','ak_70e0ce619230ab68','2023-04-26 10:12:00',NULL);

