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


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

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


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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$DG6nsK0IWgvErnpJEGu9Ze0On7PL92XcoE1vnEKkOEuWuPxjjXPR4','user','ak_635948c061f5d9ef','2023-06-11 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$fcWUQU5OcBoWR9.IE4tGszGogqk2JtP1I8ZRzRB4LiDZtDa2UZS.D','user','ak_6e3ed5f4039e0030','2023-01-17 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$cAaVd44cbwF0x/k0V28lsQ/Um5DIPuE6KnGsje2JT5.X1oba9h8lp','admin','ak_69c8c8aa1aebee41','2023-05-16 10:23:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$BHvIZy8JPVwjouSTi7s62oxwgza7VrchtbwM89Mx9ZTYbjtAgTUbI','user','ak_72777cf6389e5935','2023-07-15 10:05:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$.ach.5SdL0foKOEumR.qhWeouEpbW0//9LLZmyo5yVjTTEeDVkTmg','user','ak_58a263c9e31553be','2023-09-12 10:22:00',NULL);

