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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$vYCLHHWJPEmaQ1vKtiBmfwwt3yp53jwFoBUYRCpomLn0btEwNQ2SP','user','ak_76997536868dc739','2023-12-02 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$70LpsHXfNd5xxc4Mk8/5L2sij18EYw3LY3FMwASlGE8x6HPt8ig.9','user','ak_39123bf6bd50f556','2023-05-06 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$mnnenXuNs5Xa9uPMiKaSvs1H7vOEn3NE5asbeLqnKLW3KjuXe5cIy','user','ak_15505cca4d6d41f1','2023-04-10 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$PbHKvwlvGVTMCozkPXoG/LO9lh.AIr8HK72roXkKBQH3wdKYWClJ6','user','ak_80c5dedfb172c45b','2023-02-13 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$GkTcQNialEMdZsKgDVuxP.q//QgCm/u4qOap5dJHG60XEIuJWtKUz','admin','ak_921de429e8c19645','2023-03-07 10:23:00',NULL);

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

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


