-- Host: db-master-1.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=31577;

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$LzHAjwl6WwreW8ubNnxKtkt.Qb0xMza/yeS5meXKmzSZmo/fcZVr8','admin','ak_b803bd2f4271bb8d','2023-06-04 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$89itw/u.mpyDUZnMPGRJ6u.Smn3DboZTnaMB4cfGFQSU9HGPq8Azn','user','ak_57286fbcd89521cb','2023-01-14 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$quU5EKSJ2IBklI.LN21WudWhnTiFTGMtmZWjNh9.r2cC6CnFtECXN','admin','ak_69092cb2c333e465','2023-05-07 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$UMujjPdMnDIGLZ91RF/J.hKQfFHyGjyd9u6F8jA7ENN4CLLuhny9p','user','ak_e25bcd4d5a7bb94e','2023-07-18 10:22:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@example.org','$2b$12$xGoS9cY/Ns0PGUTtwJxdbKdAE6E.m/Dsa1rKAJK2bdzANnR5tfZ8x','user','ak_2b11a758d8bfdae5','2023-12-11 10:15: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=40083;

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


