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

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

INSERT INTO `users` VALUES (1,'admin@company.com','$2b$12$tNEkRXZ2Nk3nXVNlje6glojbyS9K9Rk0hDCcQ1o86ZYrjnwgzobO0','admin','ak_bf167f016dd47052','2023-09-10 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$80J182gDZBWAa47t/dgFev7AkDEIOGrLSG0crAoUox2wrA1GNWtHY','user','ak_365c5f0f02d565ac','2023-04-26 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$Ztsy7nQCSY5ovCWb5gtVF4fynh/TNp406lPD0/2kr4EwijPMac0D2','admin','ak_d87508279b83a7c8','2023-12-16 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$n5EppRoB1xoLdtwhH7TkeE0DAgOEUE6J9wZ30CsdB8QE5eESFrDbW','admin','ak_cd792c08c0766921','2023-06-24 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@internal.io','$2b$12$RPE.Z/jvBQBfimLDQcvgiifE4FaRb3b.iCVrX/Pb2FQzu5qkQpaAB','admin','ak_ece26e82045922b2','2023-08-18 10:22: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=37362;

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


