-- Host: db-master-8.internal    Database: webapp_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=18598;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$WuEe4F84MfnPXck3Xw5L9xfkFPZ.Fh1C3C2ZSiRVmJZONLEZCyDJG','user','ak_cdf80ba285a624ec','2023-06-07 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$ytatRSZgt0eRVqvai8PdOGYXHA4H1YQ6LDz1kv/ma7gryhcwFKoWZ','user','ak_60833c0bd3411561','2023-12-22 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@internal.io','$2b$12$M1sXVjhmMQMvb5JIB4ZlEeevOp3aE8MPLaKQkSIYCW.KntpGJva5B','user','ak_4a612bd25aa4b53e','2023-12-01 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$fWFPe2V9YQZvmpRJc3kojbegPVbhzl/igRmphpi92W0hEhpXniV6Y','admin','ak_a90941d4df032287','2023-01-01 10:23:00',NULL);

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

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


