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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$lFcfGTV45F4QBoUOrb3dg8M0QE.4nuEFzNiG2jJMu65kpbgE4Udox','user','ak_f76cd006f19ccad7','2023-01-17 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$ndF1fIUaKx6rr0KjK2kPle7VxL6iw1FOp5W2PnW6OQbnhRYERFzRm','user','ak_d31009041fcef0ee','2023-03-23 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$HQCRe7.hUO3L2IcWDhEeGs3CWFoOI8qBIpV4Y8s7xMvP1LoDNsg3n','user','ak_a7cd76db25e06607','2023-07-07 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@example.org','$2b$12$91RB2xXQOmDG4iRGdamrK7fkRDZB6qUHNCq/HHUY4jq35UuttUC3d','admin','ak_1bcafbcb92cc5f74','2023-11-14 10:07:00',NULL);

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

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


