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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$bkcRZ5oDVmW3B86QLxJVT5UHatqGD2sc.ojUcPEo/X2NPQw5Ni0uw','user','ak_041510c7f69ad22e','2023-07-07 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$ch6UThu2hcScVnpALF5rJsr9l09tDlaBJJawHrnmmpD.nvxw0C59f','admin','ak_55a4005ca420cc14','2023-07-25 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$KFk0I02X8h9Y33UZXyJTNKI5eBI1X7HWx7N/BxaqoS68GogMMba1K','admin','ak_75e7a78e6b8712ac','2023-02-11 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$TSu/kA5EJYS5YRyhqELzEdUPOY1WSqFZD7AQFK7Hr0ij1h09UjoFF','admin','ak_3f1172d032aa3b73','2023-02-10 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$gWi6hCfBEn7wk01O8GTVO5ci2Y5U.2jpkFC/T5wE/KrWutk2Q8X8c','user','ak_f107fa54edbc4a7f','2023-02-26 10:06: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=8918;

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


