-- Host: db-master-8.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$6RIjj/IRchZ6HoqE8/IB4VbiDDiZU.8SmHvmVyouX.2/tGhivgZSR','user','ak_0b198c6ac5e562fd','2023-10-21 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$R48Tt5GiHv7doyp1CMR/ud4vxDo/iG.NhN2ha3tBGFfvsvN0UykI6','user','ak_ff6f13c6132a8063','2023-07-28 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$j2tf21fHxQ4IW8S0/k/VvddUBJike0S2SfVx.yUdccp6qVWFALnDh','user','ak_2698a03a50741f47','2023-12-17 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$IeobA1.JQtd9aQhzH11VIUwBc1rPEcnJL1IZ22IOhPKNwK9JJW7dO','user','ak_202a6ef773409603','2023-03-18 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@company.com','$2b$12$pUX7IoGd0g6ovGDuacEsDTfIgMHKgJ3VtxCetdq34tMoTywuDW9cC','user','ak_17085aa1b92f6cad','2023-01-10 10:13:00',NULL);

