-- Host: db-master-4.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=11912;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$RVpbp.hlbYasoS.TVojACXDlJmG06eA07zOBjdvAZEpoWthPVwI7N','admin','ak_40eed044ccf06fe2','2023-09-13 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$MRy2VsVxy/H2lLalbALKr8g9EssXzaaCiiQ59iVq0Y.66UfgoHSmn','user','ak_614d7e50cf675935','2023-02-16 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$5UYZPFuIEi4krPCR59WNf8RkQFkwZi9ObD6FXqDLoE2SIgGsoMSsn','user','ak_f06ef5e9bc2ff64e','2023-03-21 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$31ETDDvA/8WowOa00rgwa8yiOxkNoeCmRYp6iuDq8kJvi75TmlWSj','user','ak_8cc88978642928df','2023-02-11 10:03:00',NULL);

