-- Host: db-master-3.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=21899;

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$gKIlrWYk5XURbYkpyKaY/Mb1067tmDciZKdgXi3uj/0nI4kUBGAYu','admin','ak_4a873d30597ba29d','2023-11-04 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$NVmer44hKqyg5sD2pvbmVLZoYGlBg6rQWuHixYTXhpoAfXMtJLyxU','user','ak_7f2a30b73ec18f6f','2023-08-21 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$XLura0yDpa3Xcyl.IxsKWf6OTmHWpbciC9a5DTQi4iPlM7olXuf10','admin','ak_618243977a19aa24','2023-06-07 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$vQCc.HFxKdYzM6VfFfaToPv.Z.Qug1hHq8MatIrCyVbB2.ZVsq4wO','user','ak_52d27313886a2062','2023-08-26 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'root@company.com','$2b$12$UQM8FmzRzoVLPyCsFhz4p9qwfP2TxwbXPMs/miEkjWQWnlK9om6Da','user','ak_67ca28950b4c5d8f','2023-02-14 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@example.org','$2b$12$sYaQg9dFbUV2vR/LDgvpdrWD1CSbL6f9qjWMgDIRQGZCVv0up1/MP','user','ak_1ee3057828c36925','2023-12-09 10:02:00',NULL);

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

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


