-- Host: db-master-8.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=17539;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$zvMxbTs5AJapWjlLo.Fud47ItXCt54HDnXNZopdzUItOh1SlpdGiW','admin','ak_2a869855738345a1','2023-12-26 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$4BeT1rLzLPESi/MpZlQl0jtx1ckzK.drTqNZySyFOnqHd29uoPGNZ','admin','ak_2933ebe80f9e50e3','2023-10-15 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$zedTESjhZxxt9FKnqPf1LIA7iXUWtnFtitEfSeFzXGmyb8cDkgQGY','user','ak_0453fc02ef45081d','2023-08-12 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$gNG5oef5bgjsilxKeras13b5KuRNC48pa0rG4QNFFKd/V1L.yosDe','admin','ak_205b98611ae1f18c','2023-05-08 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$dWOJHQeC3a54rX4NxNrrWpsHELlPm2GidyAx4/uUEGMwIpgdsbgxE','user','ak_25485020611b5a62','2023-07-14 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@example.org','$2b$12$xTE6gCGBKdV2dyYwVa4CfuvUgeh4pW2sjhxSxel1XpHBG97WufIV7','user','ak_e7ad324e3cd4d6e0','2023-03-01 10:09:00',NULL);
INSERT INTO `users` VALUES (7,'dev_ops@company.com','$2b$12$HWHMunjL04IAPre6dnbjCb8rYaP8r5kL00yaQemgpGKth.Qjsppv8','admin','ak_9d27ecdc36b101e4','2023-03-11 10:12: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=5986;

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


