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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$.LuabbFUSYUPTjWsVf0OA3RVdhlLP8lx67C6nEHHEn2s/7gugNMB9','admin','ak_b9a84a771f503126','2023-08-11 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$u1liAP5aueRdLGv2gMFnOPA1Xh5fbVlnIvi88gXVib6lL8C7ho73h','user','ak_f4a006d7d0949d81','2023-10-19 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$p2KxMsej5.4XE7rWVEdUB/W6234jGTGULvbWXQ4vsAEB4XpAUjRwH','user','ak_b13a441075ad80af','2023-09-19 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$K2IZOZVDU.lM.nk.qpxu1RgXvVQpEMWQvA.KRSmuIACslIZG.Noil','user','ak_3d9d346bfca7779d','2023-03-25 10:13:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$GtjpWmbqWqoDmQ/RZ/tTE3sm3cv6IDhE5pVTrNfsZgiyi8GZ7rPvz','user','ak_7aebc7c66ad1da53','2023-04-10 10:10: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=12102;

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


