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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$exheQSrsA8L0AQbMED/jCUBFxUVKL/x4OjeVPTx8d4M1cuv/gSN5W','user','ak_33bfd57f61121740','2023-05-03 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$4dmt1eaoTgx1SzXsbvcShypf8IQ.IlOFguBpD9GsuDBebZSGR7SQs','user','ak_d1d48faf6e0945dd','2023-03-22 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$CxNSbME82ReoAu2AyIEVpHW8.kSV4rMp.lMzGuuYiKU9bDlv6IOs.','user','ak_25df1b7f2ca0568a','2023-03-28 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$mm/vdXXjQPTd8koZPLnDEehMfwhkXQts2.ud.2pvLFKdMr2C08Jj/','user','ak_673fc53918ca4ade','2023-11-16 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$tSrsxExiIGK2ehRJghYhxZDrLmMnxCyHA8i1Z10uGix3aUXWUsCoQ','user','ak_af7f6724fa430712','2023-11-20 10:20: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=22130;

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


