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


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

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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$sMp4mJ9n2rk4JEG4sCOHF6HU19jFUTpjZd.sVlTu51DNwf0K0Vlo.','admin','ak_3d22686f80ed9e2e','2023-03-10 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$R1Xq6t8XJAetjY1VHZ2Kqyj4FI3n5jztxVFJmBRhUEc5YlOMEpcfP','user','ak_d28bb3db43f2b7c8','2023-03-07 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$DpmTjC5cy4478pgsPf.pWk0dSYRuIJdK9KrhFkWqAxzQH.6Ozwp4G','admin','ak_109f96d224ab35e0','2023-05-14 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$NbY9NTPZS5AnlbztLxeSSt6LZcdYZgg7Re23/GUBbWfSjBGk2bQgr','user','ak_03c9b3d4aeccba57','2023-01-13 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$ibWFO21vprpdyjmrcb8.Y8imjBP.UXr5npPnpjkl5dHEwlDAG8cbf','user','ak_4a1c98e059c09371','2023-05-05 10:09:00',NULL);

