-- Host: db-master-4.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$ie/AP7MC7txIWV9u7CBgyiVfUB7RCgcYa.CVzH6HQz4LE3JkUvx9v','admin','ak_e65fad925c064b9f','2023-07-05 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$Aad.fgVZF..FdMPakl15/xncwy9EPxqrFzzmjQSaaWF6ie3IBJ7l7','admin','ak_98dd170a37b657d9','2023-09-12 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$o03mQvsNKaFUXxwpcInm5oKytHejUXoU3PMTe2./D6/AYKsXe9sTv','admin','ak_283eec1cb3155bfc','2023-05-15 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$jQhbQPPOzbn9sDDdS/BSclJejn8Ik0hpm3EEHNQ6e9g3Fuk0Qm89o','admin','ak_355839d5df172ee9','2023-08-14 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$yf83DeyuU2bWMiRBhekvDDxo6EJ69ih4s1ux8dmBdlaU2BtRf/Ud2','user','ak_0b6c3d474203ebd3','2023-09-19 10:08:00',NULL);

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

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

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


