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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$XPdpF7WV.vImUMnMPWXhAitLfis4xJWtsFF0EhWQ7CnTuf8bXsuvj','user','ak_3f929580df82d732','2023-12-03 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$vBzoTOZNjIY0SR5juMUSvX1nbrWPTOCm0fzlRsZdv.mqr3BTNYmFz','user','ak_9f5f21930be4550e','2023-07-18 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$AOk54o9qzleHJx2aTED8LbO73aOQy4VvZ.eOW18USG9s42mX.pJ9C','user','ak_2604f1b37e299af3','2023-10-20 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$MJkSAe1HOQh7mcRrs9uxe7tsM7wsYdmcuEnq9KbkkKiLiEJi.nv42','user','ak_b33a17e7b65bb940','2023-10-03 10:14: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=20550;

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


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

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


