-- Host: db-master-9.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=18830;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$.i.bMVK88ZMmkI3Ce5.XQbVKmnJwsXuOZyy..GzRo6G1j9OB3D901','user','ak_abb4a98eb6b5b466','2023-07-28 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$VNcurgnpPegAc9XHkdbpttjaFyi4Uis69TXYpQjA8opZZwQ5l8n7d','admin','ak_10e4d384a5027a68','2023-07-18 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$JYF8GgmueidJfJVzvfwygGlwvbLIsCAamf9.3581b8XCi6Yprdhwc','user','ak_897703301cfe68c0','2023-02-23 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$h2Z9I2jI/Vs/jXpheiWXBZT74qg0OatHUSRaEze3ZrjzY7mj0tbdT','user','ak_7284760407909d03','2023-04-08 10:19:00',NULL);

