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

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=43696;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$OLf5ua8gtbbIWRZX0tEN./Ade6R7RQA1H0cz8zC2k3V55fcsudlZJ','user','ak_57068ca56c63f050','2023-12-04 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$7OGnEbZv0Oyn69xC6VC53J8Qy1YlfBfI9wae7PirC/3LOAZIgZ01b','user','ak_acde946c7b8930eb','2023-05-17 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$mI0BcWRnbs7tJdTEXIBwf62mrNyZB2PN/xPUH1Ihq2TW/YTLiHSJr','user','ak_6c3d1118017d5a75','2023-05-03 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$ZmczQ2gViIwpY1dDCRGeoZ4phGwAbFJvtZsbMTjYlq9XQe50p9Hbq','user','ak_3af44e247a5b172c','2023-12-15 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$AvDrdyC/pz2LN0ZK/L0yG9qrwUOl.I5DIEJ.K619TQHztfQcF0PJt','user','ak_ea1306015a80fddd','2023-11-10 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'root@internal.io','$2b$12$NCmFKleNCem6u6GRDnoyGEpNOFZ/ei//IUYnz3WY2/7bCO3CcXXk9','user','ak_abc8f816d43cd477','2023-12-25 10:18:00',NULL);

