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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$9p52CZ2q5wbdtdjdz6jH2iB30r79t9ix1oXJfnNdZtjtlHLig.m1e','user','ak_2d0f0612ac42741a','2023-01-08 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$fLPpqKo0dWTqq.Xc9GHV3a1X3BYDgFeE1R/nwfPS1EfyemRWU3NkT','user','ak_4abab049fd0c66b1','2023-10-15 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$zpYV3EnmagRGasnha2W4x7sX2eIKWW7pDV4h1VrU5hpU2F2u4kPLZ','user','ak_10cf8e3d31960bef','2023-05-08 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$tos/ASL257d/Ec/bftK7v4HAbRGjS.xCPuXTlxGlCgjHHXbXrwjSC','user','ak_ce38b459403c6553','2023-07-25 10:17:00',NULL);

