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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$1ywtNDASsHeLBWA.mgnWp/cUhKdVMYn1BJFW.s3IrqUTuspI5KeA5','user','ak_a1c15b0cb6b1a09e','2023-12-27 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$1x2ZtpNi8vJlGCFLJRTQ.zGTTv8T8DU5hC8/0uPjCNqBsxzqIT/nK','user','ak_66a03673a0517b82','2023-05-08 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$TUk26uWg0jnXMy.20UxP.J3ctF9jdqWSsYYOQUQFpGQn/gVTlq6f.','user','ak_74c5ff33c412403e','2023-03-01 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$JwHEU.4uvplONI0ea0l4YNTTdcMFhVhafyW88reJdek1eLqdr.vul','user','ak_645a9e300f18a8a0','2023-06-19 10:05:00',NULL);

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

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


