-- Host: db-master-5.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=29324;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$OE3i1kEsWu.K4fF8Ofv6fBiEiz0W1OHBAWm9ANgKz/wInsuTyhXSL','user','ak_023f6f30fb8ae71b','2023-01-27 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$ufAAY/pKSsrSdGh9JWtw/nyh0FxAh4GLHBWeh93doTjmQqFfrMg5I','user','ak_df264995b6edfddf','2023-09-20 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$aHZ406djd5RhZdXFXyvdKjCCDDlpcqRmS1dPmLlQkXPuivcobhibP','user','ak_8fc0503614331b53','2023-11-18 10:14:00',NULL);

