-- Host: db-master-8.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=50544;

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$Z/XtJoW63KL9BWmfHQSgundPAX9QJS4vBx.He7eNLZm2ydii4WCCc','user','ak_e6e2f57a242bb90e','2023-10-13 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$ICXT9ck9HN0II.1SKTXn2wGMdcPKj1d5.v1i8JSF.KcjyjKPBCOZc','user','ak_359c742d0808b092','2023-06-14 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$To/2IrnG9ivnfsVxlfLCj2FGfL48TuJAlzH17w.i0asxZ1ZGp3wNb','user','ak_e21b3fb1df90358c','2023-07-02 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$awALj1xuNlF1GervARjJGeDtNPAgkPSVUZTwbxVFl9dN0GDIwIor8','user','ak_14b607536430e4f0','2023-12-04 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$OktCzhojczOgVHBkJ9DI9i6tORTaEwU7JN9c9qfKWm/ZVmO5hv8rd','admin','ak_94962aeff7c4c20a','2023-09-20 10:19:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$9N500hZu2OxTN87tR0UtDMGvK0V5a9Kn4Eboyn21HHQlgwLS4lk0L','user','ak_48e48244acafb8dd','2023-10-01 10:06: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=35321;

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


