-- Host: db-master-5.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=33841;

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$dBcX17W8WwFiSC7kBsw5cGQon9ea.94k0h5a3CuXAjmQxTuFjAfJ4','admin','ak_e3a53241cf0aa6ef','2023-09-07 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$.sCmKqdmilOJ1YP/Ffw1p130gB4JKsia2O5RN15hA3LRapGY.QV27','admin','ak_3010d70f15fe1461','2023-07-02 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$RUOw9RZCOcPBJsiMsjbv8JV38jKjMQrPpxhbx/JVgYjd0nuZW1RUj','user','ak_c27cbc172741993c','2023-01-11 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$vMz8F8afFmIwmY9M/oPzqU7JAwB2f18bJW4IS1l7oD1muWAuPy3Pl','user','ak_83f2b65e7c085a3a','2023-06-04 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$QBMPQHtPbakRxFUWjdNWDXLLcfbRtDP/j13um1delSEG5vGMLOSLf','user','ak_b7b1ed9837f1b970','2023-10-06 10:09: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=25947;

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


