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

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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$4Yne/isgeEFmQEO/OW./TAapO3V8SB00w5dPkp9CgPf6bUI7/eNwz','admin','ak_609df97d41928518','2023-07-24 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$QJQTcuYbOpPX.Ky.8KeLMY46Eoyf5l9u9.5ziK9xNiZf3aQkNCmKn','user','ak_f7df43bfed221f2b','2023-06-12 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$CPHjDkdPeVDPn5h91bsc9uuYjQITLK2K3XinJdCe0c/pQAhodM701','admin','ak_af1de76aa8430edd','2023-01-19 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$NcA.MV/yHG7fObELGVeFwVq1SpVLG90v9HiSDkjrKvpfORY6rW5OG','admin','ak_2f73f967927684c0','2023-05-05 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$6SpHlE46rzm6n2YHtfXSFCP9FcNONh21UaANNROvetTHUx2aU1FlI','user','ak_abb5d714547d349b','2023-10-16 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'john.doe@example.org','$2b$12$3hYkEju9dNGztiV5SQqUE1778TjsuX99wX0BqQkX68Dq3CuDvj6q5','user','ak_f7a89a3a7fc34809','2023-11-28 10:04: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=29481;

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


