-- Host: db-master-7.internal    Database: production_db


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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$UlHzf6mXACXDiUtOGtuAgnG88pUu6RxGFkMS83uyqfFbclVgpAi92','admin','ak_413fb7c16c1b7d9c','2023-05-25 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$jdrdzZ0GWjBcbnRsAIrp0DaRmJyNZNMSnxPdM3SDWvGq52CoAVlOT','user','ak_f28d92fd92836203','2023-07-09 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$Xl772d8HoJaukQl4LWVoARkBPvfZdM2cJFz.hhcE/h/bv8tEo2HZm','user','ak_c7d4b5f01aab47be','2023-01-15 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$eA0OJiOtleOZbWrs3Ie.TlY0nsQtsaD8By5gCE7y4IFmoLrQ7yfBT','user','ak_95661eed36a2345c','2023-05-27 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$ps/WQvHUIpWezxCO.7tU0hRXJcoZrtFuq0PU72c0QL4XDQfd5q/f3','user','ak_7795f0dc36cc2895','2023-08-17 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@corp.net','$2b$12$Yxf/O2dA/ll.QiOnTBmedT2KwJ9ofIBKP1uGW528bre4EpvRS17pd','user','ak_777fc3be089bf84d','2023-12-10 10:12:00',NULL);

