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

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=43108;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$bdB72ARUtEE55AJGeLIwi3mWUKTsG2fiGY1dTI95TlG75EgrUXF9t','user','ak_883a50a9f42ef704','2023-01-19 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$S7PPSetl0CEqRnyHDl83G2qxDmFbVWIv3CVY2xfDWOzGlHtD/uw3L','user','ak_63c44442b305b383','2023-07-10 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$GcdNqvAwUGONPFJaWtuns0UMDVIEAv2gM9Qw96.TpLHTqdv96xb.d','admin','ak_7e9bfc7ffca24734','2023-09-13 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$AmsLDexLvP00Az0INXL/yR9BC5mUinD1i.4XzZxrektaRySn1rcvR','user','ak_35fda96de9f02159','2023-12-06 10:09:00',NULL);

