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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$Lw.hjF0bvrGx.gxa5V41Bk35NqWE6OUVtGOWeKWjsgEHn1H7RFYGT','admin','ak_ae3df5db9feac32b','2023-02-06 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$bN8YgYGak3J8VClyO6RUTNx52Lxd9fO5vHxGxee9y4YzzqGlovGSn','admin','ak_77cffd391a8d5884','2023-04-16 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$hYZ5uis9jNi582h1nH8HZo04.eyyM.93U9QInqvyqE9VRCApA9uya','user','ak_44cd6bde081344c1','2023-08-19 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$ZoswHoNDbYO2ZrqAR35gDpl4mkKtvl4NGuMhCXd8HPa6mODE5TyXC','user','ak_594b6cbb79b33193','2023-09-24 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@internal.io','$2b$12$RiAms9fgTpaKT.Jy0nLaHtAekrDZJrVM7tfh6yLYWryqZjE3YvBHN','user','ak_0367f8b00e4db34d','2023-11-23 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'root@internal.io','$2b$12$p0.TyZCZEVnqWPAmZfmA.cjZgEeSJN43/x2d9NjfHVQ/0yTfnyw2o','user','ak_04c034440550e49c','2023-09-15 10:05:00',NULL);

