-- Host: db-master-0.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=29409;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$Pd5oTwyhk5Fa3xLMInpOFTmqh9ZtsD1KpGLaqw04nhnK6WpAX5B9N','user','ak_594730a1b358cf67','2023-08-18 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$7iUTQFmjTHL5FTkAAnsoxNtccVVALwOR9pY3XnXMCishX/FWejPXL','user','ak_eb4704f2b0752008','2023-04-01 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$1yxOxSDdvSAyutd2JVtEY3BsxDkxhseT3oLFsXaQWM0WMyiD6SbT4','user','ak_833b8974c2ebebef','2023-09-16 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$O1G3Rl9nXXfMPfLMtzubaImCVs0MAZROKDZpqOOtuyckRuWkWCy4r','admin','ak_ae78a4797e99a3ea','2023-04-01 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$2DzFIe5/AsAx/d.8QzXlwy7Kn7lpzCN222KVE0V63LufSPeTQQGYv','admin','ak_a52ae8f35239d870','2023-10-17 10:10:00',NULL);
INSERT INTO `users` VALUES (6,'admin@corp.net','$2b$12$f2lcfZwLOVdYTEDim0feiCf3P4Z2Q2I372YnfPIN05P3mgbwXzFfy','user','ak_28f8483ff84821fe','2023-10-23 10:06:00',NULL);

