-- Host: db-master-4.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=31899;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$ODdqQn5Xlc1AQ4y/.j34DBaOMO8bMw4nZvFJsy7kFOkLGv/OFJ4rS','admin','ak_3a8f0bd5e9526310','2023-05-25 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$Ujr3uSz0QYCqzNG/KFzvM/zsK5olcZjGMfa0Z2pFmLiIqfT.V0XM6','user','ak_0d54be89421505d0','2023-03-20 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$5jXWipSQPp0VNBKw2N3jwlTzxujf5sv7WwgQ5oq//2ZvAejpuXk5W','admin','ak_e901241e2fd83053','2023-07-23 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@example.org','$2b$12$FGGJyuHJ9MTg.QlHPJl1gar/FJrHr7fFgSFTeLChu0MN0iHmTQFEp','user','ak_81bbf8a5720e37f8','2023-08-20 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$d067DincGOhWPGmHMTKgjGgjD3ttMKMOp0oxQErvcNM/Ixfqagnuw','user','ak_bfeaeb3f549b38cb','2023-12-05 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@corp.net','$2b$12$7He9BWgtzn8Rk2Q7NzF0I4q/evgk4hsQdqhRDFydifEebeUfStZE3','user','ak_5ea2549a33d6f9b3','2023-05-26 10:14:00',NULL);

