-- Host: db-master-8.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=22535;

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$OpwVbhLGYFtOLwAJUdEy1GOQ3u1VrH4CAwYoai82Ss6jWrjdPwjMc','admin','ak_aa913903a1cec2b4','2023-02-27 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$IJjnTHXCsG2YUsZelNV38Jf3VXBxwzboFF5AhxbQSF6BdEZRJORoY','user','ak_96629b0f21375757','2023-01-19 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$GTiGcTrmgqMug6DbU2EYWp6bW34vuisKwtu9x0pVSoqg3cGnFi6GY','user','ak_bcce8577f3d44098','2023-03-22 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$jZR0bXKZaV8wRW.cTxt9k/KuTBt49yhpUV/I3nBXIPXEQf.IpG79.','admin','ak_992a318030c4da8b','2023-01-22 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=43128;

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


