-- Host: db-master-6.internal    Database: main_app


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

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

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

INSERT INTO `users` VALUES (1,'root@example.org','$2b$12$hZVysUcw0neXOev3RAUsqjwMYpRbkwzPaF320GG1jGeOiB5OTdkq5','user','ak_45f34d24c48db4aa','2023-12-18 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$uOt3yMbufc.jpOhvARG0hKJb5PYfO/Bl4YtJmFqMk2UpFSX8UuqpQ','admin','ak_722e5056c0066f93','2023-06-14 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$NKN8l8EmCsIgW4SLcKG9PlPjayxKqL0KZYYW5D6wmpEUUBpuYPe3U','admin','ak_0e46885e106b1034','2023-08-25 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$KVvZKgNK3/poqVEB6IsLwtkzHAS.JZmEwzAjpIByuXkJU4VLnqdY6','user','ak_934ab70c2c2d7b5c','2023-05-09 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$RP3e.P0xIVgSIyPbPCk3jVxrDukmTJAexO6F5SaR2V/KtzAulF0Nl','admin','ak_af270c4866b986f6','2023-04-10 10:00: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=41513;

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


