-- Host: db-master-1.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=49998;

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$mZ3ueUI4Gb7MRmaq2Oygj43zCJVGuqckyNqEOgUzK73TWMnBrmRBJ','user','ak_b168b09871e892b4','2023-12-09 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$zPr/jMHa4pP8JvpOWLGvQ96Nb7bzfl5Jtp70C9OpXbuqhWnZeF7aZ','user','ak_86f12936fdda75f4','2023-08-04 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$XdUuK9.89yd4ug4B9hxKv7izkmOhO/zuhDvJgsSslYVBi6f9Li9EA','user','ak_2f8ff647e2de5d90','2023-12-25 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$okiq9qMXxuaz2IMXAZIS5kIj9dIRJcu.iz9nYBrgIQGf7X4kEa2FX','admin','ak_1610d5de77567415','2023-08-21 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$9AM0LV/JXL8lSVzUu5/ev2HkxGHUMVhXCIEtR/gf8lSAaO6D634wa','admin','ak_3a8c435b36e7b650','2023-02-03 10:22:00',NULL);

