-- Host: db-master-0.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=48628;

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$j.OMxwUGHUQAwhgEVEang1BncdaUOQ6IAF5ZFgB5QVZhOsSMDJRq7','user','ak_4f319516fcddf5b1','2023-01-23 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$RJUwRWSGIi8p6Yl8cpSMhIRBWN6pqwS8Q8O4NIj5UtqJUiX0ZWd1l','admin','ak_701446d9e42dcc2e','2023-07-23 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$m2tulK/oVUTOA72VCZdkQfNvaFD8f6XDOuntyxwaWUNesDO3NUMNj','user','ak_42e4b8a486d8c1cc','2023-01-23 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$qqBBO3jeTY4nnOtF4uNv8HbDMzVif9fI45xrCGO/g1UrddF2EvXm0','user','ak_dae7ae46f5221795','2023-07-17 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$VoEud//8nYujmLbOIGpxI8xCyFrJB9/U1mxTY0TwWHQ.OPWt54qLS','user','ak_6c8c692a46cf5cbd','2023-09-19 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$MRmSof2Sy/DnG91f6m7tHDhBj.7c/yxECztGuTzApwKTPGgfPWg/J','user','ak_f2cdb0e34020195f','2023-02-15 10:05:00',NULL);
INSERT INTO `users` VALUES (7,'root@corp.net','$2b$12$kH4utzXlEEIuHZbeRKpXHxr9QcUm0WUSLNhm1F4Z/ZMcGrWpm.KWB','user','ak_1df8ebfdf6d5a75f','2023-05-20 10:07:00',NULL);

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

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


