-- Host: db-master-6.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=37260;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$04XpKyvkbNmxoVPUNkRgVNjMJswrS/ORSyK88qzlKDb16h0T3MuMV','user','ak_64a8452d092dde80','2023-03-23 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$oYYX106t2K.uOyOYorh8Je2tvs6Ef2bwZW9SQGLGqF/eFfc5ZzbBH','user','ak_b386c35797a22fae','2023-09-18 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$Yf/CAnHHiGRNgRi4C35za8u5xgxKWZ6VWXHVc2xzPaDp2XZOiddyf','user','ak_f30f890f5b70bb76','2023-02-15 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$JYjbTOcNcG7LtyDF.EDuN2DaKEyMAqCNnarYpV7z4fUx85EfJMzE6','user','ak_5c11f38a68a19364','2023-04-26 10:21:00',NULL);

