-- Host: db-master-0.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=25689;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$i7l4AgDNQEF8yOF4Ly13L3wgrJpdz2ZJaeG45Zgli7rFt6nOCmJV9','user','ak_89bc58143085ef99','2023-07-10 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$qyky0lCiPT7CwuXoIqTMeWJ1x0Aqqe4OnNHSzBIYyN0bSMpDcoo.P','user','ak_5032f34e166e287d','2023-02-22 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$ezWV8/ERFeDVUbTLPChDNeBsbsL3/rN7aUkh1IrannC54bRPFj4nd','user','ak_6508e84f14cd3524','2023-11-11 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$Yb5aKphLTs56mTe8bZ9dmdvAWumTTR4xWKy98PqAx7/sVYRG4zw1s','admin','ak_cb3b9df8934740e7','2023-08-17 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$mIFE34.LTmDI6J5aUFtOe8pR2PCQ6TMahX68nW7UcSLzqiu0YtpYQ','user','ak_92687c8b76ff42a3','2023-10-28 10:12:00',NULL);

