-- Host: db-master-5.internal    Database: ecommerce


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$Y/D0YIagyTAx8xe43xr0YZDzDw96k17Hd4Vv.qQRjlwEUt11uyNOz','user','ak_7a8d15150f52b9bb','2023-11-23 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$ZFhEc70TGK7euHITnI2f2yN1r0IjrSNN.7aMkOIRF7d4gf4lw8Tsj','admin','ak_ab924e90421bbd3a','2023-09-17 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$6NkIDe6cdN/W10wrPYxqKn19QuO5JCulRPtQNtKMSaEAR52DX9P5/','user','ak_bf33536e8f71a84b','2023-09-24 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$.WEq8LatRfZoEy3mRJVf5s9U46K7.cCKfSeRtrt7NbhueuuKJDgl6','user','ak_4eb30a5461f5a232','2023-01-06 10:20: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=8870;

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

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


