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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$rT4ztqqSDouprhK747JCZBkMeAET0TfyThKAiflanKDd/LOBu7at6','user','ak_fb5c5020f070d023','2023-03-10 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$i/6CgTwGgKExW1aUJ8gLJNk4PVXtvR0CojAqO67u28aQYz2tNfoxd','user','ak_081e8202a8ebcdc5','2023-01-05 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$BJbObliPhH6saODdnKxdIJzXHkX0zdPH2NzbLv/3XuHSxpvCKpGhs','user','ak_b5fbeca85f7ccc69','2023-03-23 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$c7J.RxU4Pfq0qmUBc2Bbni4HPttnKB04E5uqpipUHRdFFamQ9CcIW','user','ak_de72df839d5ed13e','2023-08-26 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$zNU8CQHnVIMvpAc./K8V5fQddSw3CnkiI8sGPmpWGWUpf7CvF1/1m','user','ak_a670c48b4b6ee11e','2023-12-23 10:01:00',NULL);

