-- Host: db-master-2.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=9390;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$4WafB.tUU51tMTI9obsYIpFyKw4sL4ttaf/sVvOD5Dsc3g9cUE1zn','user','ak_16679791215e7dca','2023-02-02 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$/xraHV0eqCYlfPnhzlIhs7c8AFQmTm1Jqhta6QZrb2QsPsCdBx5yU','admin','ak_d6c479d5456909bf','2023-08-14 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$nJQF.vLl.9Z7f0qfTL8/2DNtrJB6hin1ym9gKieHWL5PmVBW.2Dq9','user','ak_12391ecfc1f714b4','2023-02-07 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$jS9NPAOHCXH9lQIyIBtWL7AahQgomknYaaxHR3VS8dHqrmozqAwPp','user','ak_becd94f0eacaec53','2023-07-08 10:03:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=22278;

--
-- Dumping data for table `products`
--


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

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


