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

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

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

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$S2yivVaGRmAI2j1HfRc8Cy7J3Swq/SfnXCNLcQR5d.8sTVspONXks','admin','ak_a7307f3fd2654895','2023-01-03 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$aTNghTygpAgSyw0S1f.xlEyBTDTiLHp5CyTB58omVcBFGIN5ay4dk','admin','ak_de33d3b0e325c8bf','2023-06-19 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$q6EML4QXE/xDEbkNOLX1O1GqkQdJcKomRzMigvOTPygub//JI7w/V','user','ak_30f476092406716f','2023-10-21 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$etPqn4Mn8wGx3.720eG3NNxjgGcyHqmUP5CUHaCOWmH8r5CQTbzsu','admin','ak_3018edfc2b2375d3','2023-07-28 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$Dx5mEW5RmBm32/BMhZUt/TXiHp0lOGmRG9YWFeVOsO7gPlJqH90cx','user','ak_fd515f93b360fb16','2023-09-08 10:16:00',NULL);

