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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$qXnQh1lTAo2y1OVRwidCvr0H7M2SGi4kyerpYIz1zxwdtfMqmLgXy','admin','ak_b16353618b032f5b','2023-03-13 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$ADJQ6dovAa7c1PU77rsRITFoz5MEyaNR2PwTlSn/MEjTPLA9oDlQo','user','ak_0e23e479ae6fde1b','2023-05-13 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$FA8ZFpyXxVINlkSsDq/BryPq/fSSfMGGKNg0xCM2fmLh0PAEFMv.D','admin','ak_ab76d260758efa0f','2023-07-05 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$cVSOfX5DjOB0H3UBqjyFhhQGhMfJ.INaOkt/NiT7yM2w65Mg6x8DK','user','ak_6b4e85454a42a64e','2023-09-11 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$JK8H3Wsr6ciXBI88psXivs.HFV1kalF/Zf7RMwZc3BvjZW70DY9Iz','admin','ak_45e1da10d0d1be09','2023-07-10 10:08: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=39152;

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


