-- Host: db-master-0.internal    Database: production_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=8609;

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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$8LsCaz3ykke3d46Oo8yb95ysYehBzzJqfzn2hB.GLMEcV8S.3/w0/','admin','ak_43c4aaac28978f7a','2023-12-02 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$XYsZlU/lR7HcO4ga5DCZ5/dAnXMn/vuu.bzeOEaOmat2QQ.ufODIg','user','ak_5bf61e33d2fc592a','2023-11-17 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$2GtQbKx4/h/Cjc.m.8dec6/alJheXchTh/KVlvhPZkzafMc7ueadR','admin','ak_5e2af2e5bf17b205','2023-09-25 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$8OGAjU3fTwqorGeSAGLSeUwpderfFxMlPQ9Cx8fF8emEc4GF1OQkm','admin','ak_9275b3515d717762','2023-08-23 10:02:00',NULL);

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

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


