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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$D.xW.AAqN9AlRRw12Rnci2rLgX.WYaiKkmiTC4kVVA0eYZn.uwuBU','admin','ak_963a847bd5c22488','2023-08-06 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$8BBx4vhO5qHuGeLfbpRB60X3Y5AAswDl.x9tYYP255z/RdAKO5h8C','user','ak_5af2971da2fef678','2023-08-06 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$wSAwnuITFVJfrktCD64pLbV4TXrTSCsFOU2oyzWC4uss45gu.GnjS','user','ak_aa89690688294711','2023-11-13 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$1J7pkK3tOftinxqiEC4SOXxnWwP6MRHk8jsD9rrdGS6QBV91XvKiU','user','ak_f40c75ce8e93768f','2023-11-08 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$w1DI4Z963UilNP/E37iNAvfuJZnbcmHBHbqoGR5JJ6qViAbN.RkfP','user','ak_72568d4c6889e2a2','2023-06-25 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@corp.net','$2b$12$bTaAXUFTv7ZIrqT0rvE76GAPN/FAvUJwjSPrNoFsWJb9W.1dvWKuo','admin','ak_2e7481f0f78d43aa','2023-03-01 10:05: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=45094;

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


