-- Host: db-master-6.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=25315;

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


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$7jOa4hSM9X07yNwJoaj5OxMOP3TvFcLGaux.Ejt33iG6rRYvV2uCN','user','ak_b3c0d6ea5be7d0c7','2023-03-17 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$Xb20C6//7gRo0G3DJ61UHFQSoptRxQN1ZELuwmu95bC4VfEA9ESxF','admin','ak_fbec00f1b34baf2f','2023-10-13 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$j0/VWPEZ.yExEg6A5tFxbP6nlWJnrahmi8Cnsg48LcNDZYHfl17Fn','user','ak_7fe9b567b2bc82ea','2023-03-25 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$1Cwd88/8O1W59ALM9rQ/.SvuahjX0i89vzVObaAGVMkC2IZtFIy7H','user','ak_00d0447e5fd37a0e','2023-06-02 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$T6pOVw70RrWU.4oLuOJfV.WStJclvEdpaJDQ4Fyxc2cWIDob6e0RL','user','ak_56f35f4d2e1574d0','2023-04-09 10:23:00',NULL);

