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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$1IVWGwU9WSkeRD1vMbQpBpaeWAhFHG4dEvBQRodz56U/zq9oXbUJU','user','ak_9b3b71ae59edff53','2023-02-05 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$pWHrPkGKYYiOtF7HayDwL9E2JVp5zFjrm2d5hKywUKunTdAjNMqiv','user','ak_8188f93c787b51d0','2023-05-05 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$wrJJAtJ35KWmhRGYyqhmAA1BiS1o7GZyJo17di9NetMkb5VErKnuK','admin','ak_05a736bf6da45324','2023-08-26 10:01:00',NULL);

