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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=37598;

--
-- Dumping data for table `sessions`
--


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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$C.JAMNO7JC1j.6.ZzBl/qFlkrDCaBVMRJAXLoX3tbvR996iEnqj.J','user','ak_5807972b9cf48a9e','2023-03-26 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$D2TDutku0y34mIzdRqc5QNoOb82v5IdpiUUdOnwl86OcCcd0MIj7T','admin','ak_2aca7707cd4f9d79','2023-12-02 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$sUrAN30hQjiBq8L6MTzJIE0BW5o7uMdRYa9pc/Qu4xjJfNhVrassD','admin','ak_d4e2ace21a45d788','2023-08-25 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$plsXTtL1Gw1xOEvsnGXVPQC71Hp96WanHoWAy877v7DFoZuXoTlWT','user','ak_2da66aceb70044a0','2023-02-19 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$NKocLUOytnJ5Xgu3VWLsJxBwsMRe2TskittfJjaKMymmGi9nOwqJG','user','ak_2205490fa81b9ee4','2023-01-12 10:10:00',NULL);

