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


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

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


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

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$idE3CFTz.fJ2gA7TNuyaZVvoVc3Rf70fFk5ZB/NdtPzVWNNtC7KFY','user','ak_347cece5dd000e79','2023-11-01 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$fZ2KRa80j47.FdvvWi4G4Y6AYqW3VrlfTHiPR8tx9m26qYS.9Xx8/','user','ak_4dd68bbe0f5805f7','2023-12-09 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$WLlUtuWEE7deuMSkIB4qU/na6JFLSN6k4QoplG5VDkcPI8VHu3ry0','admin','ak_7a5f8df6a7e13829','2023-07-25 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$JDEWQ39r35BAvolD9e.8CX7eUjhopTz8IOTy2K3vkFLSRkWLu5cel','user','ak_e7fbfb0d4dd3ccf1','2023-03-10 10:07:00',NULL);

