-- Host: db-master-3.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=48596;

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$2MpV9RYS7dzeAKfwx.M6EEy1VsFCtSN1jTETZ0frrzD4tStozWg9e','user','ak_9206b72724b0bd56','2023-04-28 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$hMlK1cP9NBmWaEqlE4AhpAJnK4YID7X5hD350gYFDVwrxAhSWK7uX','user','ak_13f74b0924db2e99','2023-03-26 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$5Du87iRsyD.d8Vljs66jTvoY0/pG/D6hXXbPzjrrRv49XOPwD7Ei0','user','ak_04f9d69b521fee17','2023-01-03 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$hroRij/O8U6dgxZmg6W5bKu9faQkgIzirSEcABZAyvsESDVYb9.vJ','user','ak_9a69556dcb52f0ba','2023-02-03 10:17:00',NULL);

