-- Host: db-master-3.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=21742;

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$eqHOpH4qVWgAJ1v2hkKY.9.A2kRw/K4ekqN4cct79/9JRIYROagFC','admin','ak_fd24ff6cfd20df01','2023-05-16 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$oKVJGPCyDG00oZNRbxAE1zqvzmnngqmGR7MuHgXPnLXPUx7XljnD0','user','ak_15c49cc24cfe6a0f','2023-11-28 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$.JeDiAGtmogM9.8C9pHJ3IKYBeoyttT.4fviVCaKUwjGjHJoJXkcb','user','ak_876cb236848ac09a','2023-01-22 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$8bcXMtrczKttI7flQ37Vm6ffzkRRmFpzgakr63Sy9hcjhGMtfilIp','user','ak_2ef83e425d6d571d','2023-06-12 10:08: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=20184;

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


