-- Host: db-master-1.internal    Database: ecommerce


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=33111;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$lb4RznR6iPuYmtbAPwK6aaxMA.sxGA65O38teftEenVSs64J9NaSD','admin','ak_3d04a06c4c812d8f','2023-02-09 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$kga0x/AKgaV.sSHSsITd0W5EuTTjEe7YUh.bqpUDzpUjiYI9SvQ43','user','ak_2adf20bb34ca3407','2023-02-26 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$BcGuaFfh1HRj4imCKYShjhR/lSXUyQ042zhBGmyvPdySDuoMaJbGG','admin','ak_82435efa4d6e7465','2023-04-14 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$ZRIxRP3U22ReJuQx5kIKtx3WGX5sV96Hc6.quRo3Jsu4k4G0GplVU','user','ak_ea075a8479cc47c0','2023-09-18 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$Izl5wf9wY4a2VWebeOhgEoKwTr97aJ8NSBHpF6g/wmUIoe5ym6P41','user','ak_f19d30f035dbe48b','2023-01-24 10:14:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$iWeUWEQlpG09wFYDBQCJu2CyDk8DWxRn987ujTTiLdElIS1SsIn.P','admin','ak_959b81d38daf6a62','2023-11-25 10:07: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=6910;

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


