-- Host: db-master-7.internal    Database: ecommerce


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

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=18824;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$qPD6GRelI/zsDT/Z4IvL6S4nesYMxa7kTXZe0IxDNI2iQvYfr/dRs','user','ak_355ef8fb678ad803','2023-02-26 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$I3zDaNUiP.gLe3hZ4FFJDLqcZFFbs9pgDW3ulLrswA8YcyQvPyKtj','user','ak_90786c88ea28d5d5','2023-07-24 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$C74lQJEX3IdSg7sSm0r1KuF/CNyxcgayiILDY/OvLQrxtbldIIae4','user','ak_10357a6423f54331','2023-03-04 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$d9plwsM6aevt2IgpBVrJslkBjqdK4HxLxrjGsJq0BWwkknwLCnRET','admin','ak_7631717e97e8e8e7','2023-02-15 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$pARjijYtwAnpOQCtKsxEzsbrK.yvbC86Sd.RYEcC4nIEgvN0Bxjtr','user','ak_42afb5db0c5eb54b','2023-04-21 10:17:00',NULL);

