-- Host: db-master-2.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=9651;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$eooUcWwWc2k6bZi8WDoS1BNrofwClo/CQGd2acvHijEAFzVzV9Gv5','admin','ak_317b9085e781d522','2023-10-19 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$8cqgk8/kbpysZ444jDwlh/e4oC22pMjNeYBT.vUCfJcWKdlwHrNqh','user','ak_32c32e0a4b776a84','2023-01-25 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$tfo0/5OCMl.elXI9MOtY8Wmp4x5efESwcZNSiaEa2k8qfwU3eXiZY','user','ak_1264e0fa057118fc','2023-04-12 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$9fNwbmqi6IbNpmE7dUoOxqDfVCYQR.O5JYAz2Fu94qGq/wOjNYWbJ','user','ak_d0e2913e0e714f41','2023-01-16 10:07:00',NULL);

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

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


