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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$uSz5ayeBNFv1VhTRTCVxqbzXInMgRmQaqLY/RHqeEGTTWCt1eWGwQ','admin','ak_805b28d3325b695f','2023-01-27 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$ys1Qo51HLd8E0v2nufxYFpNCUPHYldPCvLwz27dcAZ2.NNulZvLaX','admin','ak_ca9d1a27a5ca4bf8','2023-09-23 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$tK2tkw2mb0WkOE1k8GIBuaVNetduhj4uWKH83e4oMLz3oreyXHxXA','user','ak_9e59bd6cf94ad57f','2023-06-21 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$3NDa8bQDwEXCUB2dc5wu4w0JB9Xx2uz.ZiTNaM5R7EZ7OhZ0bVHy2','admin','ak_41272a625dbc7401','2023-10-18 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$IySWjRLTMOPHhy7jjdDVdznsV.K1Zd1vT8tflm/1eJjL19/6WyEeD','user','ak_d7eb2bef6c8ef4b0','2023-04-09 10:17:00',NULL);

