-- Host: db-master-5.internal    Database: analytics


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$STDFGBfl/h1KlurHAiS7eNZoA/0n5t5ieVk/YJ2Bjun2wu1OiaiFE','user','ak_c1065680ed3faf12','2023-09-16 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$SaMo0IfkWaFPQILnW5AlJtbDlu7hK0vYObsP0xK1E.4iJRi/MyzaY','admin','ak_2a7d84fd429655fb','2023-11-15 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$R2jsOvJVSWmxER0mpFHQyqY6KkWNpcSla8s7RFTze1zdbX8QjYlNm','user','ak_57b8d8df4d0dd1a8','2023-07-01 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$Qzs14HoXNKRa04PBH3YBYW78FuUIInG3yrZFmn9GWj5DmovKrXO8z','user','ak_6aefcce6bb5a1083','2023-11-20 10:17: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=10983;

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


