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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$pI2DZ117ax.xtSxRg0HjSW8c/bmzgWkyc/vT9ypzvATGr8RBB19Ke','user','ak_0a5ccc2658da4a06','2023-12-02 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$Kn0uq0IsxaIqISaB2QXoqTLwkKbNZNUP5.iU9jDcm4eNYnDGLlE9W','admin','ak_da45e4bfe81a982a','2023-01-20 10:15:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$bFq5P/JnFC2PlIqP4ZwtxXEVqN9ICcxfr8rDVd.a7zs1GGpaH9628','user','ak_c79ece9a762aebcf','2023-07-25 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'root@internal.io','$2b$12$87zShSR7..zDNNDrIiYv0dmSBh/1.At8vcQhSIwZ1/L4p6W5HyrBq','user','ak_4a3bda7bac62cda9','2023-02-25 10:14: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=22953;

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

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


