-- Host: db-master-9.internal    Database: ecommerce


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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$/vPh4OvrVhuwlen5R/tVv5TbOKy6XcUGiRdK59Yf1NpoU5YpJS9MM','user','ak_d787ddbd8178d135','2023-06-23 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$4/C2IGoZOhmN8GBTV6rAW.w8gRbols6NrEALP5Q0vIx7iBiSguNYn','user','ak_674267625074e2db','2023-10-04 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$HKvfFBgyB6tJUpFBBRfhPJ1iwPxhdtaz70IPRu8dW12IqSA21xqlQ','user','ak_a182f35c2e33c483','2023-02-19 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$g5wY4kSMPi49dq/4OoPapLzNYKDp1cDpJOKnc8nhHuVNZkIiVyIY0','user','ak_9e66be842e8fd072','2023-04-15 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$VQTiFyyvhXi4WjZYigLEs1oxW9YWrOSNg3cu2e1htJ2TTQ8kESbMF','admin','ak_e164a75fb6d49a17','2023-05-11 10:07:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$TBgidf5kZouElVP0xAk2aAxOqt..lbZa9sSgrPUWS/w94IBzuoOLg','user','ak_d42ac7f6c2827dd9','2023-11-11 10:09:00',NULL);

