-- Host: db-master-4.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=26808;

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$6kB6DSqhtacawkFWJ7nmZYKrYZAi.WMEAyyVeR4kX6/5MsJl2YBfH','user','ak_764c7ab88ef23f33','2023-04-06 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$j.pO/mPeFg/YrRasmqsW6Bsav13N11JC2d4x5EhuDmaX140CE0ZXU','user','ak_92c4db965e98032e','2023-07-15 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$t6BSkNV6WSEkkbnd6yJGXaGjJjyY38Fj46eZty.U15aHOxtDFwqCL','user','ak_952ed1b7fd9395ae','2023-03-21 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$ZTNGl.jK5cLu6uqzmKcXoZbOgYChtFDjKHRnzMMNNzdMIhxkWDmb2','user','ak_58b032a9891fdc0d','2023-08-10 10:19: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=3539;

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


