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


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

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


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$4uLb/qf7g3Q1IL7greGCmoutd602JAZ/3SWUQW0kP.EuwXcbnEUJS','user','ak_95a66b6bb09190cc','2023-07-15 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$Ad4Stby2lzzgLk9p/3bfu7GLoZ/pt7xwAAAhxp/OKexs0r3Di6eV.','user','ak_731fd6c609011159','2023-04-10 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$AaMRHXfOdbhuPWjUEXPPgDU0gcmddvG5vgD/9yRUqEh91CiFyqp4D','user','ak_cbe6ee493043e91f','2023-03-23 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$wOY/8dcBKxFfkxOxZmsz.IAWCHS8M8u1Wf6DwFhhJZzb/XV54aHTz','user','ak_cbe87cf46f7504ff','2023-08-12 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$suonC.yqtvp789shktNL2EbeehHSU8u/pJ12j2jvjpUes6DmxM31P','user','ak_78e6f7ddbf88acff','2023-03-02 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@example.org','$2b$12$h8IxYLrHGLkbHIVior7kxnd4ECawmJFHbwFbnaBeVXsmNvk98gY2e','user','ak_9c2ea25b4af53c59','2023-11-13 10:23:00',NULL);
INSERT INTO `users` VALUES (7,'root@company.com','$2b$12$tRdPQJTzvMFcgQfchhVVclk8J082TzsmtLTB8DOjtfrr5R6w0A8yQ','user','ak_c3f484e2309fab51','2023-02-12 10:03: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=1970;

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


