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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$H5D1OA9Oft0J1HRp7AfzaZajSCWgEHv2duogBzS6YnRwNC0l3SGID','user','ak_a742fd40abf06231','2023-09-14 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$DOqXv3PxIKuFFqBVzRX.upmN3elL.yXICMtlPJafw1qWN7WGhbaMm','admin','ak_d4a993f93e29a21c','2023-08-13 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$w3q0iejRNlT2KXjs8VKFkL3/YnY6AGQ5NpG2K7odCoYqzMallUmjE','user','ak_98cd4012ff1361e9','2023-02-06 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$DmVuBKiIegKldszEz9eiYJQiP8XhA5OkNpYP2g9P9XU.LbEN6tmwV','admin','ak_dd3993debbb39045','2023-10-12 10:19:00',NULL);

