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


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

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$kXpTNncCp62JnrzTLd1GqwLV68VIV5R9IzORaaYftGs.qDIDXlaxI','user','ak_ab297dd49dc7b866','2023-04-26 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$YUxWyr.sPGoW9tioSD.0vKgWLSWZphbC0ep1JOQ5LKD5Opmik/9cc','user','ak_68ff20d6fbd3536d','2023-08-02 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$wm0Gg/1IKeZgSCcmp0iALBI1ax/bMAG1fLh5l7Wrj2OU.3EbWB7kT','user','ak_f88397808d7ce1f7','2023-01-23 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$TiDfnilZYfo17xhC2a6tBkN/JgBKV2Zgt33dtKrr9ZYtCGP3yUN9c','admin','ak_fde264044bd96aa4','2023-07-21 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$W6V3C0.jLx3WjgUv/gg/8j8kK9yOX1e4mB8icptvdLSQ2uZHuQAZn','admin','ak_5cc143beb3da40af','2023-06-23 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'service_account@example.org','$2b$12$uKfJN5dvI7ALZq2tZK7UJI3HoG3S0Sy4tU0HW03cG9SWz2IMLjlIn','user','ak_16b068df3289984f','2023-02-16 10:06:00',NULL);

