-- Host: db-master-4.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=17104;

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$8I2K6oH2G1pyJhS3lJkRoWc1VmEk5VBjP2Zbhxd7gJ5pluHSItZxl','admin','ak_c783a871db5ab663','2023-09-27 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$VnLj4hdlFkxCCUdhmL2swcYEuOY1UyeweiIIMfPJHMJgQmqZ/lQUT','user','ak_18c7a11970107fe9','2023-09-27 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$gWSPjsl0eV01cv9m6vFwIu9qwd8cHAeT.Nk4Qt3wB941E8kVmAyTS','admin','ak_5d55195a2ae74bd9','2023-02-14 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@company.com','$2b$12$5NcES786s7bojc8KEpNT.Sv.fU2F2ChSOmVWnyvBo9WZXLaBogTML','user','ak_98f391ebec79d9bf','2023-06-20 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$wcA3N264TG9ykA/xFiEp/eOQO58O6/PmKqsyiPAQXq2IJpZErJxwi','user','ak_3f2e1d57bc639ddc','2023-05-14 10:00: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=43665;

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


