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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$7z3CZb2fuP7zx.iPkirTsHOI8YHO9QyJtPeIQkJ/guSPPBqNvHjR6','user','ak_61ad12f5ee9ea31a','2023-02-18 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$76G7l6Deaei2Kf.YS8YMcqRKr.M4W6hXXsVMLYMyFLiQlA6d4nPeN','user','ak_7c4577f07b1652da','2023-08-05 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$OzGfFfcfJel/Y0GAhSS3nvjvbSg5JWTiVa4WW9GjdjwLnQsIp7kB.','user','ak_d5257ddf0c119710','2023-10-02 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$6Lb5e2ziLataXaYJbOKhfjNBLtW7rctx6LbV0zUfQDaOu5U.374Wn','user','ak_65d7df4e4e555940','2023-11-02 10:09: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=8408;

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


