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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$IxvDOz2U7zQ/b6bYOW94illvGHneHNCYzJpSdt1eQv3jdyXBnNDEw','admin','ak_08878348eafd1b29','2023-02-20 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$8pC3HTovnb2IISgz3m.pN3Y8rPVx4hzTnIRcGK3tefyU1s6mKaUCh','admin','ak_b313345623634f8f','2023-11-06 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$NdJegfR/j0ePw.Muim2lP5C4hEw672wRMfhbjzPE2YuKfqeqDMCFj','user','ak_de51f09fc5342c94','2023-04-25 10:06:00',NULL);

