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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$4teau4DmVCR3dotmNP8iWVt/pbNU9BmrjvK4wMqyXCtwnM.gcKJak','admin','ak_042aecc366944325','2023-07-09 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$aSemFkA9ZkO1cDU90Yzgeucg.QftmSMrK0II2R0HpRZaE4yiyPh8t','user','ak_6844ffc86ebad9b1','2023-01-02 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@corp.net','$2b$12$4yOiNjZ6s4XrCCAHKznOEGt0/AOUZk9/XdO.18vaXA5L8E8vYP9P6','admin','ak_ddc71be79317346a','2023-03-06 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$sibT/GPc.Wz8pUWjsQhWtE7QM9dWOo9NSREcj8e.kVs1BQMMiLClK','admin','ak_650b695bbbdfd147','2023-12-06 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$c.ti6c4vyE2q8hOzXMbWdPwAVafkFw4d4RjI/mpATuYeJHFP.6H28','admin','ak_3020a24a890063d6','2023-05-01 10:09:00',NULL);

