-- Host: db-master-8.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=42949;

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$Pcv6L.YGvDuhKxM6U.dJ0dmTHCXX.4M/hnEcilAtjSD2j/CDqiZ.n','user','ak_1e83589e7e326f42','2023-04-02 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$4DwKmSbgJQA6VwMkpibBMJCz3OpZSqAHYb1Kg1fy/k8mrZKLggbdJ','user','ak_df70d3ae590c17d5','2023-01-01 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$1rrMA2zuG0L.qIQ1fOp9FigFSyU0Jl4dV2Yq.7sbkDT8/pPiiGjaB','user','ak_def2c92eaef0851e','2023-07-07 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$gcuR9tk6UDRvVWwTQuUDnSU5X9lXOXRxdzoNO965/SNrJ6rFzXOx6','user','ak_9d5586b90b7237eb','2023-06-22 10:09:00',NULL);

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

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


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

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


