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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$Kf2bW/yERQrpHLZzUaGYgd2ia0RaJ51hjrvsT2VofkWV41bc6e2zz','admin','ak_39bca6468d97a7e5','2023-08-05 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$Haqev/JfLIov8l0RQ9QvmUz99CluzWmuL5E5mXtV/8VvZwa0Kz7g1','user','ak_72ae68287f0bbc08','2023-01-06 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$AOJYHJ0/H1bEWGr7CGBZDCs8LSml22WRpUqYxZ4IrRGjwM/h4OPU7','admin','ak_1751590dfd2643d8','2023-05-04 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$gbp7KY5PXXnC6gBCEXhO8HfvX8tMkL2ywOUF0iZcuJiHyqx6pfUAg','admin','ak_5b0a165edb19b0b1','2023-12-16 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$BSuDsj.a7wFSUfDPw7gfihJCxjWGqSWvuaVF3.ZQv/YTPOITQMu.i','admin','ak_17e454fb52fb03a4','2023-11-09 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'root@example.org','$2b$12$6xT7FIbLCDMnr3cOfPZ.JXcqzF0SomJewb2jKExTPPkmcexPRlMib','admin','ak_5a5c579a7c185893','2023-05-18 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=21278;

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


