-- Host: db-master-6.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=43842;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$tIC/tdVNOlq3soHTxo/Y6MZ1IwNM5ayWV2iNR/omC1DmITzBBZ1BG','user','ak_ee8f19fbe904aeae','2023-02-07 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$zhdYSvtCTCPDmSmD2ybD4/HSGO.fWKvevQMcC8gWm8Jel4dkzquQj','user','ak_29717a38808dc53a','2023-09-17 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$fy.GA0ztAj1Rho35exnK2wWC/GjqVsRLkeWeendvw1.NuBLlNcfnf','admin','ak_29228a667f218880','2023-09-14 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$KWKPzA83IdSFI3p4.OrvCs934Stld010QFxpXvakC29f7oKtJXvNx','user','ak_364f7e17022c2ead','2023-09-22 10:13:00',NULL);

