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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$gmnKTMtdwSKc05PJD7Vmr8K/J2VZ2BFP4wNairT6jqtbPw9dkPoQi','user','ak_8e0ab7c941564315','2023-09-07 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$UuA0pJsm5BUbbOv5dbdqs7nLuVi0lQWiP8MhhcnhxUwwQ3DX.QHOM','admin','ak_d851dd28985c425a','2023-10-06 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$bioZZF0nLsGWdLfv8XxigPgTJT2Y6N2yxJUD3/LGXM4i8yVbO7IZ5','user','ak_8df5d0d289467186','2023-04-25 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$IQ5nugIWd1ITsSuDs578JhOSQyeFj1sPLZrmTmXbpbCKs45KcV2LL','admin','ak_7fda4e7e4b1f905d','2023-12-26 10:00:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=9933;

--
-- Dumping data for table `sessions`
--


