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


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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$uDgF4FUwta4BZDtGeJTuWRNQE3mmHwJw8VP/x3TWwGntIqx1efXzf','admin','ak_8ab75ca1a0aca2b5','2023-02-02 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$tsg2c7mjVUZLWMUJJde5BXkIOL1LHejDTVDybvttWwBlFQO20hHmi','user','ak_400d6a1e45092220','2023-06-20 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$BhVb4X/Ay0xWm5kpm0CC5wjjDg7x5eSCR4coKETMmxC0Q51EWhHlu','user','ak_fb91e2fecc69e862','2023-12-07 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$1SM.gFwTkKcT28nWPlB8nT21dgpHHkN8EuBGw1ry9jjOMD6n5W15d','user','ak_316863f4b1d087b9','2023-10-15 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$U4/8xkqJCGF51/t7WzCp5/fLL3dDuHt1eG0NtRYUWpKrDAoCVmqDg','admin','ak_81fe5f316e4d109a','2023-06-16 10:10:00',NULL);

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

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


