-- Host: db-master-0.internal    Database: webapp_db


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

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=16746;

--
-- Dumping data for table `orders`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$crGwRFo4od03QTk6Gq5zRLlwIWf0qhsFHJxGCC7btKqwjXnu5kPEf','user','ak_ebd11bb570db57fb','2023-12-15 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$SKE6H5lIVrx0dNgGx9xevfJ6KZUdrYts5U.Wq6jhpAHu9r/NKuUZZ','admin','ak_5a53d6ecb3fa3948','2023-03-01 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$urpcEZck20UE2jDwXOnY76u3Vd8ejmggf6ViX/fqkGeAVs.znMcVL','user','ak_9345b67551576213','2023-01-06 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$M1aXgpCNmo5OTODGYFbQ10i98Q/as2vuuZkU2QVI07RjJOOYPPqzP','user','ak_c3510071120da4f7','2023-06-24 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'root@corp.net','$2b$12$NlRhxqReyqmVWaD8DWfAi0HITIDizRwKIgv9oGe8SdkmhfxGo1zdK','user','ak_814a9144e5d4007f','2023-11-20 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$UsbFRgqm6SBabtCrRp3KFl1EAGb4RVeiSr6JVGE5xjiflowa7t47D','user','ak_a84964b494823eb1','2023-12-25 10:07:00',NULL);

