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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@example.org','$2b$12$bw7jL4gwTG0GWH9RRxRqxf8l/or8lxVjTlQ07NUdM2TEm0KTnEyF/','user','ak_13f7f3b404eda7c8','2023-09-19 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$8ga/8AAhOsBdbLblv13qlIYM8ZTILOLBFQJVxuASH.GT36lE9G3qf','admin','ak_7c92e757d8e04499','2023-03-10 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$dQm26y8SWYV7lYQfwLg74fS37K3uriuI62nmRzMEkhMo6euhprCAH','user','ak_fc8b3bbfbd3764c4','2023-10-04 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$t454ABzpfdt0QgI1f1ipQcSx9y.Aom.KxNYHY7sDAK50THjxr675O','user','ak_09ed351399bbeb5f','2023-08-17 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$HXnbLs3.pZTUxxpFu5tLMgO4rbnd1DlPy0f2TQANxQIsJoF.BEIaN','user','ak_b41d81314006c55f','2023-08-07 10:19:00',NULL);

