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

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


--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=1574;

--
-- Dumping data for table `sessions`
--


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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$6JGR8/CV0iFvejmbZxptrotUjrWe.VnLp3/Q28/lFMQ/fR7/kOO1n','admin','ak_5866c596495590c1','2023-05-19 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$lpBYnF2F6TpeAnzd42TR7skXm.gkhIm6YazzXCSxx8HCm5oXSdOmz','user','ak_fb40a9f534e144e6','2023-02-23 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$2/.KTPKckwFYqF9LbsCfhXROS.Jo/r4z0HVoowj3ZtYyRpQ2FtUxo','user','ak_1f407556cdf75718','2023-02-26 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$l1dU669f1hlHzdoHQOnXDC4OSNhYRTTNyiqQ768cHP3jMgMTA828F','user','ak_5513247ffae10c4d','2023-10-26 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$jVhOuE0QMe1clxxShWxXkZydGu/CsGgCo22ecHie35XIRiU/omGTN','admin','ak_85a59dc595044b15','2023-06-13 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@company.com','$2b$12$gsgnqJ4vSQIZB24u2FDeQb8UCiHDrhI/syh9DatS6SJeXtxNJ1pfo','user','ak_b330c0c7c502a02f','2023-11-04 10:12:00',NULL);

