-- Host: db-master-2.internal    Database: webapp_db


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$nw5CVbw8bzeqaPXTvhfY0eDX5/6wJ9Wqtgkzh48Sh49u/7ActEB9A','user','ak_876834f4e8229b89','2023-03-18 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$5Yvqhg0zwvI3UXkT/0dcGXMnXyCSJFD8dwC6PyR4PLVzoNuNgQuuK','user','ak_1c00630df8ae9493','2023-02-08 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$X72uTU31Dp.iBxOn2yr5L0ObUVniyYBqokKJDk1H8UKMWaolu37ZU','admin','ak_f14de358fe1b41da','2023-04-09 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$rV.5PP45a0qi3T9tD07NC9szIL8vUcHm2/JEyq4GdGm/lFni0XM8b','user','ak_d75211d3ec9517e2','2023-04-08 10:18:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=23784;

--
-- Dumping data for table `products`
--


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

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


