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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$HwyFpsDazcCxSo/MeLsFGCBLseVMTCqfZCZskAFIiEhJsVOdXxzUv','user','ak_8e03d0d43de30c88','2023-11-24 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$tELvcxpsu6JAtmh6zPFZiNuDM.i0Dd9M96ey24VtWowYBj8/bWzAt','admin','ak_90f1a116c0d3df12','2023-01-06 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$AUCyzu9Ap42Q6GKAHdQG7PJ0swWjIIyv/AOc9WC0eTEJf5rY4Fy3.','user','ak_6aa77b5c21efc795','2023-05-18 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$N/WN32I8nVVYKO0fiSBX953eU/7pN5LX5bz3.nAqQoY7apyfMuFu4','admin','ak_c6e34c80e7c0b02d','2023-01-23 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$14AV6ShpyCl43.2PSgnjcefpQWuDfoBbllsbh8p0g6.zEEL.FWSOF','admin','ak_fbc15c5d320996bd','2023-05-16 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@corp.net','$2b$12$li9DhWLpEtqPx4jVDnHngaj5Ry8FBJcaTvtf7kiB3yDh3Mby4ljUE','user','ak_daeef2da2f9158fd','2023-08-14 10:23:00',NULL);

