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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$g2bCgtMq784iNDSAwOBMWDYuzMzILwrOcBmmej8ZVsfqAsakq/qgv','admin','ak_3d71987175a6ad35','2023-07-26 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$8u6KyJsfuUoLKUtVsq0ZlF1vgoSTTf.RmAKrgrBZoNxBfDxWTp.N0','user','ak_d8da90b5520ad48b','2023-10-21 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$uR.mJr8RrXyYad2lfsN6zZiBoM97j6o7jWHsUFtt2PDFiJYr5u.Gm','user','ak_e6886107a42d24d3','2023-08-15 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$ybssAr3IJfUxzQNbfTWoTQV3rvhk5hE7vPjTxtI/8HR5I/6ftrttR','user','ak_228466400c9ff8fc','2023-07-27 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$d5NUVpoqbJWHrLV.l2G5DBn5cUpLVjbky2fGf5GKbcfcsCy4QgWCM','admin','ak_41ef97f2e8aa63e9','2023-02-03 10:09: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=8238;

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


