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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$3Lxmngw62kJ1mY5/mFZQ/Ry9zCAr2qdyHo3mpB5As0abaEUVBW1og','admin','ak_dda61410b799a580','2023-08-15 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$lxbWZTeSsPKARaNXeqWV2ZqvWNCfHWTeR4RDdQ.3n3mgdR3NlDS6T','user','ak_d391af879d15fcf4','2023-12-22 10:13:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$2uc.d0wss3EmPpCUEK4fexgqGaJ/WszJTfygTwtI5wdVG0H/IYdww','admin','ak_56d897a97006a0a7','2023-08-06 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$4zvv7s1cKEwx9RiZuQAYZtoFjtXW1bQRzGkP9x7eB3FYShVOEjg5g','user','ak_7553ad5b35399cf7','2023-07-10 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$AWAJuAIwaBiXGZlUuMQAu18vUm235CDudzXtFtTCTzNKsIM3FjHaR','user','ak_fc3de63c1d7128cd','2023-02-08 10:04: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=21197;

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


