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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$tUs6C/o7s3MiOueZVzvd4l36Sddqz6gcN232KBmN2qnlxzVScsU3D','admin','ak_681200ea698ed45d','2023-03-26 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$ufvtQS5mZgcfxylGQMm8vS4yIf9z7zcuFW/G0pthBgJxgfug0wIBP','user','ak_eff05fafd082d36a','2023-09-26 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$sDrWWDyxxAi/zkWU2.bveE7s.EwFHYeIP5UY5tGaLrhLhP4b/iRCN','user','ak_019df2db4ea81b38','2023-04-16 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$GJGqe54ubs86OEe.YS5JPJ4O7KbTBlaZjwwvZhRfMXUNvg4LfdNSw','user','ak_fb89b5dfe08024a1','2023-12-26 10:15: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=16751;

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


