-- Host: db-master-6.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=41177;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$HcUufwmbhHTPpTPh4T0c8FkOXQ1WVrHn/4UiHW/UdNAeA7CA7D3XU','user','ak_7385d747c4f2a713','2023-12-13 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$Yjo1/QvD9SXZ6P6AsEoUzjgfo/tZnjvGQvp/4R355.Nt9o1YNduH8','admin','ak_b2357b1ff112f45e','2023-04-15 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$1HG4LZ86IzTJXtn27rxxLcJ7.nQZKlIyc1Q9ylDQZ4EktYnydtRXE','admin','ak_519b86c56ca196be','2023-10-01 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$O1ho8NtDkpLnfM.iRf373WtEIVBxkX24IKeG2UWqPHlexaVxp1iCu','user','ak_08b0f33e599016c9','2023-03-11 10:03: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=27332;

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


