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

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$G1UZ4Tv1esZUieNPuJ5JnYJV1H65CcBWGmaqmOTwaYjLc0EK9sy4Q','admin','ak_941d6ed478641440','2023-09-06 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$Qt/vt83J/uDo62A/HZ/3UZyR7s2VxIBNXaOru.NqWWL/WDYbSedoG','admin','ak_bebb56e2f9e37cb1','2023-06-22 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$ZMwTNOIERnwVDua9aIE8E11ybdqTQG4b56rZI5S1cTr5gOgEjNT6Y','user','ak_4512f642a8973024','2023-11-28 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$hnzIdLueiJW9uad.O/rpsRW.2FzLQriHyGGe1z08W48Pe3IxQh/Hm','admin','ak_b12f068f31b69466','2023-03-07 10:16:00',NULL);

