-- Host: db-master-5.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=43075;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$IVUTSVH39Mwwqfpgyw90ghVLWJItn3.5qKi9Q6JkSsnoKvnyq0Pf7','admin','ak_2e5ba84039fa2c78','2023-02-12 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@company.com','$2b$12$foW6XDmDSJdmI.ZaRgo6.6u7Nyvkw3QpCFzFKMAewir2C7Cz6hxxl','user','ak_7d5c35e81630617a','2023-07-08 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$0WpvBqoWb7qWYcci9oJE2UZWtKK93j2z0YzMihNL.YD0QIqyxZ9IN','admin','ak_21f8ddc5e7e362c6','2023-10-24 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$gLL48hMo1s.Bh7JNXOmzUFXBoG0uyBk/KaCHLwBWevbqnL0m9HyeZ','user','ak_0fd2686be1449b7e','2023-06-20 10:18:00',NULL);

