-- Host: db-master-9.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=26387;

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$AbRk.7Cqt8uwa/R1.xPK/HxLYZ9.e3I.bzkLXu.Voqxc1UBLVbJlT','user','ak_851f9e700b3725bc','2023-08-27 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$SBwLLNUNQqgrQQi3rXsy6Qp/mOO9NbNUrIn9l18H5mOMG8ZZIrdCD','admin','ak_f75a3488bf554024','2023-05-18 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$GR9j4GyWGCQgb6og6swOuEFyHXA1r22bIk6fCHhlz7X2tQZfxtbnk','user','ak_520b8af9157241ae','2023-06-11 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$EomYQBYPGyPaAmF6/yi9WJVlvAJz5ENdtAJRHbNQvkcbtYk0gQIBx','user','ak_2c8bdf9c1f2d7068','2023-08-14 10:23: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=16781;

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

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


