-- Host: db-master-1.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=30320;

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$gtmoKTWExpvOAA0X/VEmYHT3Hg6vkb6DDNEjuMRdvw5SZ89JgYdxV','user','ak_022cb3b3a6297134','2023-03-08 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$fDZAU1zPnO6JdX.GFJOfFEh7rKA7pOkrnfHzbx8o6Y1Oz6RE2O5aq','user','ak_b2d738fca6a3aa36','2023-04-03 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$0a/ZWTHXJM7PO5.cy4mjy32suIYcZaHD5Qad87C.dvK9h/0xeUX3Y','admin','ak_1f20469d6ae29ca5','2023-10-01 10:22:00',NULL);

