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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$P6G1nirczuWwk.ePAO5B8y38w.21bh0y7/d2RoQ/5T0xbECrl4PTj','user','ak_97f87853205b1ff4','2023-09-08 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$6lo83BTYP2XBhSQ3iSOSOeqSAMmRo.QofI6XSDkQPggsUOrXIDr.B','user','ak_08d1409ed8571b9e','2023-12-20 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$MugS4I/030IT9IbdNTaRIZmlVKBzW8p3xynHAT8jAiTEbE/u71Vdh','user','ak_9b3a9f88b4b8ecbf','2023-10-11 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$hKzdfgoJu/npnyOswdEInwa1q9k3gK9yAilNH4CTJZ2vkcu95ba6n','user','ak_d0d4350808278c7d','2023-07-10 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$1eQXTD00.H2LftP6hr3CCm9LjmiAhCUObVIbxfa..zq6AwaFETI8N','user','ak_b603c66e0c033ac9','2023-10-19 10:22:00',NULL);

