-- Host: db-master-8.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=44583;

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$eVEC/BGzxb50q9gqfjcx.0Ny8KanJhL5TheAIIRyfG121Z3yipp8C','admin','ak_926e424828980343','2023-11-25 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@company.com','$2b$12$1ANFAK5mEJJWLBDBDM.druRIECf346EQY3s9K1Dq6IpJvCP5a6hMg','user','ak_851ce9644232e9c8','2023-01-18 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$inh9fAYgSkiE0SI1GXzGQTRPWKiXYlVr6.Cw2m2JWUjtEherVmHe7','user','ak_bcd82755b1dd0abd','2023-08-11 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$204hjTKKhYRl0MJL0WB9qvypPYohNk9IUMsRYWAyOPQfLlodDtMZL','admin','ak_3097630345426ccb','2023-03-20 10:14: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=41720;

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


