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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$Z0IuzggcAf1j6e5Wk6lbwQbBktipBjarZJpV52bKy11oLFIIXoIis','user','ak_5436d88a2ecf7711','2023-04-19 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$yfbncpvTVMiNpFZ7RscJ/MDKuOIZ7lFiXTQdT7XhJivXxm1.IjxOy','user','ak_8013b230b5c75ced','2023-06-04 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$.raj0GAv2/eUfrkOoKB0rGvBYJLfBufPO6Sr7GmnuAg/1yPlbUkbV','admin','ak_e04b08fe6d27beff','2023-04-10 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$6zhTjoWz341pqGVcZ1rK6f01TQqfVTk4qmEPZZ/q0rAg9VZAoZCA8','admin','ak_803603a0be723f18','2023-02-02 10:15:00',NULL);

