-- Host: db-master-4.internal    Database: ecommerce


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$T0IWFu90gFxPrZSo4/YI9fSLFaryUsmDikGv3X6n3/eVCkfXrWO8X','user','ak_de87d1193114ea07','2023-05-11 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$cbrPCjbd9/ute.xfNUNxXNTg/Bzp7Oxeja4qW3JeFhnoPe3TajTdm','user','ak_641fce58e3866b60','2023-02-01 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$eeG5M/mSefJI1sKq4Z8bgLpzdcYsD3s9WwfvpYE5YYydo.Ib4rK1E','user','ak_29d5850cb8dc2a0f','2023-05-28 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$IPjC4gfaLD86Mt6hv7tBOfyKAUzuzmMn.aZa6ZZ4oP.y83yBgOjUK','admin','ak_42ee8654f7d0f064','2023-11-28 10:19:00',NULL);

