-- Host: db-master-6.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=24288;

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$aVuxWfVIV/G7dfZSI81fEhqa/SDY4DfC6LNjDkQWZ2Ts1Mlpwr/03','user','ak_ece25dec4c591022','2023-04-24 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$LjldNVFfGiZA/j4zMCWc/zcSyLivzZGB.1rAvCzDSmLLWo7cxfR5N','admin','ak_3ac408123a716a02','2023-10-03 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$5OiGQGIC0lRaFkbP4VCvfUK3lzip1OWILWq.DSfnfHmVdtPU0k7HU','user','ak_85daea819af057df','2023-03-09 10:01: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=33909;

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


