-- Host: db-master-4.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=4159;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@company.com','$2b$12$sPt6cTib6IFloXJIRLtvm7FA7jczo7EAPhJ31fEkaIuLGo8RxM3cI','admin','ak_86759d6597996752','2023-01-25 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$fkbOUfu5VzVvoWhZHHIAmcSmA.WplLGlshAjsGMfWKUqzyJPX2Vp8','admin','ak_6f002bec5163510e','2023-10-01 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$3OQXn11CvDSUUaDaSQWWQiswxnb4Gfj8fcY.sc6B1eCmStsbS4Gzo','admin','ak_8958c026a65917ae','2023-09-27 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$FojvFejeo7PfvTpofzpY35XplAOkUoq.e8Xy3xT6I8ZjwroNsV1Xj','user','ak_da49ef8734c358a8','2023-06-11 10:01:00',NULL);

