-- Host: db-master-3.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=30312;

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$vlaIDWsmCVZUIbO0g7BvQP8GI8xIOHDN0sg9xdlYZgZwSvdpz69W7','admin','ak_f40655770df0d98e','2023-06-22 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@internal.io','$2b$12$MiHLitbDw6ESwvki.nAILShHlin90Ntx4qO4wTXSuWHitEdreLiBe','user','ak_8ecf353e06c829cb','2023-12-20 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$YZ0VIX3BLCSdnOSGyc4N4JQaxmsziLCusVLfoXHZYW7uePY80EguG','user','ak_e78aa8eba32d72b8','2023-02-10 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$aa/7tzz69.AOaP1hQGv2rQwj4rWaKkn9QQnP0VWSC9pIC5nmlTpD4','user','ak_1933eccd01acbde5','2023-10-05 10:13:00',NULL);

