-- Host: db-master-0.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=48176;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$HwK7MYQe5/H19i3fcYxNvOw/X7pMOO8pyUk9A5ccImWt1ZZVy6AJI','admin','ak_183b82fd2b88e1c0','2023-08-08 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$RPTa1vELDwfL/WtZ82UNZU5GKudkmzceHq.0GXfD36hmQXt/hT1Wb','admin','ak_0b0ce914dcc2f3c8','2023-07-12 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$CEtJ8E3oLrMu/dnkAhVqtRqMT1X4ZgmTtBvle0XLbdtaeaPaQym.a','admin','ak_04a03890f2ae9dd9','2023-03-19 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$C5YbWNbV6VnLzIME6sn.phb5I8JYdSrmEF5IpPRCVgKM7eNL9p8Gg','admin','ak_9a4a53712f384115','2023-08-04 10:01:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$BfW5pKDxh0FGRTznwiCGAnkGYVNOJLv5y6DWfiZe57LrTa/stThd3','admin','ak_c76652f05448d3fa','2023-07-02 10:12:00',NULL);

