-- Host: db-master-6.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=47440;

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$EVwdlAJ9pPCJukkRdrw.g94q7p1GW6v2ls1u.Z1rS80IW9bhQfjDM','admin','ak_f4b60946ffdb08c6','2023-05-09 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$UPWQHdul8TbE3kjijYa5K9heyN7b7rSijxAY7vJM3156.VK1DBH85','admin','ak_92c46ab41a54539e','2023-09-19 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$dVzRNp.fQgy17BJArtAWDOmTzSxdaQ81YS..MPpgAYt2F6bgUuOqD','admin','ak_b0c3e3b01f3c6426','2023-10-19 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$1I64vA/ZaRIrZlphIzYCQwy8fJMHClWfA7c01osDwGT8kUQ5oLyA5','user','ak_b351d84944597fcd','2023-10-07 10:21: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=22746;

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

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


