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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$aXnbuJQXGOVPtQWsJsNmEzctRZZFdEwOOr3oU8S4lISVvuO4DTObl','admin','ak_a8dab811e832a6c6','2023-06-05 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$KZMYEJ4mrjBHC/ZANWJC7A8WrkjaaMpLHVi2XZ9mDW/R/wy9mjB8d','admin','ak_f56200403a559ff5','2023-08-04 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$GH6Zx6t6QOAI/aMJWgBumWz2gfPp1Yt0l.IpKcy4SfTqy6Pd7e07x','admin','ak_708f2ea5331272ed','2023-06-22 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$xSE7cF4Yd0Tn99cOAvJ2TVsOCmJsaODKiDYdRANKIQ8BZkYKTuI68','user','ak_d0a87103afc6fdfd','2023-12-17 10:03: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=49731;

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


