-- Host: db-master-1.internal    Database: webapp_db


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$dEAkh.q63KxIP8MqMiYbIQ6CJOKXa0ZuGy216ZtmuQN2ORrzDujPx','admin','ak_884813d04aa9519a','2023-11-19 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$.OAENHwfSHQ7uENcWkwTlu5LP8e7QlyNqGWUh37aAv3G1snefi8HK','admin','ak_572561db5c216ee7','2023-04-27 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$eJlN0uGAHvL4pCI5xX2QxgYS3hfnsgUhUS5WajgzoSOmZRvxBHpdn','user','ak_a7c02132dc65f790','2023-09-28 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$hkU8dj77TZBBmnRNVDPHaueYhILUGUU3fCgIPaMfuRr4ebaHUGREL','user','ak_34c1a9caa65d1e69','2023-09-24 10:22:00',NULL);

