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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$2gvgD//Ree6JrbUILRmdDasnTg9yZANW/f88KIOSIyo9zLLU9yCEh','user','ak_e6351c4d638f16b9','2023-07-17 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$GM7pvpgkatjFPyKVz7mRQA6S9hKWLXfc5.73omXxcN04tcRjuKAGh','user','ak_941f40bc5912db63','2023-08-02 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$nrDZ2lB3xhE4K4PQZhcLHjZf0vzZ09I7WO4Zip.7rYAJwzNyvJZhx','admin','ak_3a0c38f3c22c18e3','2023-05-08 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$Q8PtaZbZkw/P09ePbj6b8/YU0OYfnd5fVXJ5OKJQn3hfDM7/bFHW.','user','ak_9a163627f7ad86e8','2023-09-20 10:16:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=36068;

--
-- Dumping data for table `products`
--


