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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$avGUPa5HCTMACqJhXycDc3dFF1elon89vwrwPetv7t3./AhQis..p','user','ak_e73e3eb768b0ae28','2023-12-27 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$o5eWqqyGWm.JYItEz4Z4LDi/g1rlk6YGeIIG3IRYZ8tgNbWZLduKX','user','ak_5ca559a24451ee56','2023-07-25 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$1.YjpWdg3GYVsQAi784fWg7uU1zJ80iI3SQUwps7FShZVXa9YD0Mf','user','ak_f4934a98bee7c356','2023-12-12 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$eU0gwRcHKY4Qoiazrf6/1eO4d28FYfyIKlHxy85xJgYrQEWRj4KPq','admin','ak_18cacf1ad6b59bbc','2023-11-18 10:07: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=45026;

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


