-- Host: db-master-3.internal    Database: analytics


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$0RKEqS/Yz0XhAmJMIUsW3w0xCM3JPGJmSecAT9Z5WqgWPkvCsy5dr','user','ak_2a508887e82a18a8','2023-05-13 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$bz0Zk3SWarG8a6rTDipBTOkEas2cGwPDiZlUrlsspYFpXYJfJ..U1','admin','ak_705da030c52eb6a4','2023-08-19 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$wbbdw6Ugss61/ZVSXGOFg3q3D0eAHRPbuBJGZB0CRnGWpqp9se0ti','user','ak_4ce9231237292c55','2023-11-25 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$2hTz005w5XWu77y6o0AHar24oN4KcnoKCM0zDRZKu8KCmz9M3S8oJ','user','ak_a6bba48808948656','2023-02-06 10:21:00',NULL);

