-- Host: db-master-6.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=9787;

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$E2n5lNhqLS9HCch2qd9r/paCqpEiljbkvzqJ.qyGBXBqPZ02gZi2o','admin','ak_403133f00cbe0edf','2023-04-06 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$PhTplC.UiSWt7dzYoQPihZ6600xU9/gf6iHr3F0LQHksVhbVRky9X','admin','ak_615a20bcf6dbebe4','2023-03-16 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$DtKf4yVmjmcWTwztY0GU6uIOLFPTcd1LxwwkJkNVqjZ71tBZ/gNgd','admin','ak_e796adf462ffd9c9','2023-03-24 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$LlYmWdyBMkfUtaQpMS2bmQkyY/KZfhYMhjP942CD4tKLMbCXFu3Ar','admin','ak_8c3266e66c14e426','2023-04-28 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$VorKnJ.5hmDq3Oc.Z.n.Y9O.mNU1Xp8KeuEOXIC2ST7cuRJ.BOnMm','admin','ak_2cd92c4056e7191f','2023-09-06 10:05:00',NULL);

