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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$4SHNM2JfVS/6xJkNCAA4t9PCEOnVqwNuP0taJbc2J/r4kgf18T/Wj','admin','ak_c8be53f7335de909','2023-08-01 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$lFth7yuKF1QLDYjaj9iZq8F1KckkhJyO2.bvodbeS1QAwsieZ9WBZ','user','ak_40e7e22d7dc38037','2023-11-22 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$/Roj47TbYopVVS64zMmLPgunVhz8kRmsjc8vsFI9gzhCsr8vje0.Y','user','ak_bb9e33889c0fe131','2023-11-13 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$soi.MZnKEJ/XeVHkNyKP1cj09nEkSQCqGyPqjSWmGKyK5wEdmcRhu','admin','ak_dd2369b1d322620e','2023-12-07 10:01: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=27443;

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


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

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


