-- Host: db-master-5.internal    Database: webapp_db


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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$qrV2Yvhq0o1bVHupqQELZRgxBObEpClpYzIo1/3JQpmwduBagtbjL','user','ak_9f79cb1a712f2515','2023-10-01 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$p1mGGeNGkEnmRQj.bFrKpL7IPQIaXuaJr4.p7NtV7dniq7hm52bwv','user','ak_19e0e87c145ab723','2023-10-02 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$zd742pmEFDc4iZCIdTyQUU7Plt..odVV/FBH/FZhQH4Cx/oDkTwTB','user','ak_83fbc606146473c5','2023-07-10 10:08:00',NULL);

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

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


