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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$v6zfbD3oqbuDC3gX9p5BuLeoBU0VY5B34AyVgWWz.tHESH5xpiMtn','admin','ak_dcabdc962c61b443','2023-09-08 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$Z4.2baqkpRLRrDEQefxHe/S0gqIlLczUggytTeVdox6vUSaaq.tFe','user','ak_aa0dde5b4c4b67db','2023-09-23 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$PTAdfaOeXr2eBzi4x5ojePoqKMEDCE6LFXhw3xmBkmuCw8YbWUKYm','user','ak_4a93c4e49c027f98','2023-11-15 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$ccA2.Z4e06y0GxuFKcxZIZduqTGZ47/4xeI0Yj/3BMkT784QTQnbj','user','ak_197c9455c306b87f','2023-11-06 10:10: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=17731;

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


