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

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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$79JI0.Ni3y4dn0YUG2KXwu7NRlgv9QANkSbwpLIqUdFu8yONg1Gks','admin','ak_8775677c3d75b498','2023-08-09 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@corp.net','$2b$12$0LXX5SFXME0JUSv5rC1LO.p91uP5uQISM61fVnCMF0GWnjmW.Ciyb','user','ak_2bf1263a998fbe4c','2023-11-08 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$IaCGmspRvyTfFzaIuqudr/6teWlI.HO0Z7gRqRhjZrwRU59QoyS9Z','user','ak_e901820a83418f05','2023-04-21 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$oZdoIkY1Q723skX1.40TwEBy8ouCtm8gzApeRqaPmnrXEnfUY.6L/','user','ak_b145714407d496fe','2023-09-17 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@internal.io','$2b$12$2Mdn7s7B.iF9x6CXoP6mofXlt48ptz.LU9s96tmFC4d/xzvUL8LZw','user','ak_da4641bc573a48de','2023-11-02 10:16:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@company.com','$2b$12$KInXvPnm9y0E2i6pi1AJGXCyVzUcEU.UYU3RnJ3pd1JhO.Bw8/1d5','user','ak_7c17051c2fedfa35','2023-02-13 10:20:00',NULL);
INSERT INTO `users` VALUES (7,'john.doe@example.org','$2b$12$px1jFk05rco2UBogN8tvgBtVtxXbe7t4M5/V7NRHDioeVlX6Y51oS','admin','ak_c6440c9beda280ad','2023-02-06 10:06:00',NULL);

--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=15218;

--
-- Dumping data for table `audit_log`
--


