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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$A41CD7oyOh0isr8ABa8NiCqg4s30HjfKnSRhXW2puVreHaEkO2Ve3','user','ak_6d394531d21fb8fe','2023-05-09 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$8J9JZ3kRI1L1rquRc4ys/dera9noh5rBJY0yWx7qREi3FjTrp6S.U','user','ak_9c33a90e458b7509','2023-11-16 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$wmrVDpmVDWQc1vltEtqF.7s5UWN1iQp8RI6kfQ/NezEXAvJMqnhfg','user','ak_0b6f297845b0ba3d','2023-07-25 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$qv00wanY9GZ1yuzEYnPjbkHYMsUNIe0WxkYErwFH9EW1WaegJPjYA','admin','ak_90e2e80abb2bf2ee','2023-08-05 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'admin@example.org','$2b$12$CyOjTchWGNp8fkZSUzB7GHMJlomjJgdzVH8qhPSQFMsGxoR431acx','admin','ak_2128587a5af32480','2023-02-03 10:18:00',NULL);

