-- Host: db-master-0.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$BuX2e2yGSLbPW/AtA8La0RMvJBCvbDJLoglz24eNXsfWuOHmCudYy','user','ak_53da998cfeab57f1','2023-05-13 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$PPWltgASBLaiHWGh/CeDHfR/dUeNXkHmADDuD4M/poOjagVJw.UJR','user','ak_09d53f3ea3aa5169','2023-02-03 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$FHXHSbc0GsuTeLYv1FqvxmLkkXn.5YjCJDTXg8FuOyeF.ediKWvEp','admin','ak_0cca1d2cea2ec97b','2023-09-17 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$E/eb7c8qeKVbzz28IbSV6A/iSSkV4f8js7KMrxu.uMqBQX1zfTDXE','user','ak_8e9a2218215a0932','2023-08-01 10:01: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=18860;

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


