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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$y2EeWPb00jq3d3wn5GQTFEcraRuHnXdv/4vdz6cqpY1ZF2tpqBWBP','user','ak_e7389ec0dc7f2522','2023-03-23 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$M8R3FRPNcn4P1hFaLFQr/CDFDCvXh5x.vt9napo1D7YHsWex/q17B','user','ak_de9b0b092da5a975','2023-11-26 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$NpLMygpFfAYSTSaDdjysW48q4aVjmBjYfijWOyAr/yBxcarfT9zZF','user','ak_b8426be09b5809b4','2023-02-16 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$1v565c9wt/Mvv3/IE2zrvKV6uYw73vMfAZlt/jbTtk2zUPj5HzdJN','user','ak_d8fb65c068fdd0c2','2023-05-05 10:22: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=38571;

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

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


