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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$bMJJNfKz1nQImCuEB3/U8LX.UYS32cmdrbhl42sLKelUjI6kRTe.0','admin','ak_41499e70e49299c2','2023-12-15 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$ROAEQUqsUayc/qiSdeUx5gOicjYCym6bm.VnC3nCeA5v5xTs4iXPj','user','ak_9a056aac7c3b3579','2023-05-01 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$MBLk/CSigBZmBwPQCzWhERZE7TiRk0EYoG4Utt0AUOtSyyuUPEoQA','user','ak_21e992899597d685','2023-08-08 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$HiASOmMP1QSvo72MbIiwWhEv4Zs5RT2ussXQgvZpxPcXx6zlu7vwy','admin','ak_d2d9b6f05967a2d7','2023-08-24 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$3ywQ.K4kMW6KbYLHkmr0PnywQMxGjTZmOMa7yjCqVq81uH3AnHhTA','user','ak_a7c32ec979f92c95','2023-10-16 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=5532;

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


