-- Host: db-master-9.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=7227;

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$PtFmG7LWdZTSm6lbsnPMpQcWU57zqzcZtxn.4qbv64avZE3IJiejR','user','ak_e39e790648e696b7','2023-11-15 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$bA98OlH9yliens8Ksg1lpUVE4/lS4QOCyhb0pJIJTm7lxNA8uj03N','admin','ak_a835ad6017a29a9f','2023-08-14 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$zsHO3vTPKfAkIdHO/nPfV8idsJeMm4/lUsZqB8DKW3f5p6TyXSwXx','user','ak_ea3c1b27ae601beb','2023-08-06 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$8v8j9Jd90Pb2QeDUuvoz8M7vQl1Ttd3fN3oqwKESHDf5.K/fhcOeV','admin','ak_d98fada1aac43145','2023-07-16 10:14: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=32780;

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


