-- Host: db-master-8.internal    Database: customers


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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$nGtx8AxNaCNJMeBB97kF7KAgkdeyVqVitR7kL6l5L.aShhZj7IN6i','admin','ak_461fd721a8fa4aa5','2023-12-19 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$yr.Cy8nlrBbZw2S5KFPT/juf7KynsR0/xK5McFYr8DEkn08i4.9eB','user','ak_3e28e1a0bdf0ab36','2023-02-04 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$VvO/y7tdvr3hcbTj8zM0ELa/o6sDG8m.9yCNQ3UPsuKSUr4XVI4P/','user','ak_f399ee88f386a178','2023-12-08 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$fsfqhlc/tr6pnz3AMlrCQq5kXuiXSIba14uGuc//VXtvHcumxrPAT','user','ak_60a29d2a822081ca','2023-07-03 10:07:00',NULL);

