-- Host: db-master-0.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=47499;

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$RgJkMDAHBhxd/yFftWtOLRRe/mUAKRJpbhuFnjqRLD.OVgp7yvkR9','admin','ak_6c29917c1a8ca171','2023-12-08 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$FfUiYTI1.WnuSWC/w/Lg2dNJmzv6.cgLGjrKHKb6rB00pBQ5HzIY/','admin','ak_42bcc18cdc6f4561','2023-01-19 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$jK5eum.mvrcKtp8b32I6o75lvnLtmJ3.7eTonU1xNOOP4IcGTEJA8','admin','ak_f294c1aef2cea142','2023-02-08 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$qmSxqyhL494raPBASgvJIHVR115dbEfrqaLc08SSUkdRWWHe7ubfE','user','ak_f054cbfefdf5414f','2023-10-01 10:10: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=7912;

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


