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


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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$opBxP1bv662h4R9XIul47idp8Gy04IQUvnqfPAV0AGJYC9Bq.GvE2','user','ak_bb1ba9d4e990afb1','2023-08-19 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$eS7Vf198LafYx59u6xCqUvZo.HwbzHfu4F68ZhGL4PAIedhXjfBpZ','user','ak_88edcd9968fca296','2023-12-26 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$68ax46iA9EGGLGqpuu/4cR6JXRVr4P6G9HYSvLbcgoEXA8X1vRdkx','user','ak_c2891e0915aec392','2023-04-17 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$yHx..cN1BBspKTkS533CCyQH0lzouBTNKmzaZ8Ge7iAqm02zauRKj','user','ak_ac007c1b6a36476c','2023-08-03 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$3m63cvQL.e0uoQMT2mtpzHkI.4iRMjiANF8k7ueqrEQLJZAs5RXGY','user','ak_74902c1f37720051','2023-07-21 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'root@company.com','$2b$12$KYGlSWO3dRB6oZoA5r5JkhMKDaP4GrMb1/yMn2/6frMT7S9Ch9TOI','user','ak_9f02f28dcf562291','2023-04-01 10:15:00',NULL);
INSERT INTO `users` VALUES (7,'dev_ops@corp.net','$2b$12$L83mXlcclGiOS37FAU32bKhtftIFTFCbFXpKVxX1zg616/KpiHSdQ','user','ak_f914f7bf1e9898a5','2023-04-23 10:15:00',NULL);

