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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$/2/eSWT3JBaD3k7KGexOIu1/00fVsur9yaiLBn5MdvFl41AsW9C8I','admin','ak_01b980bc5f233b4f','2023-03-10 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$sVrvz.dTP7Y6E3oCsUIl5qbcbdf.6tiOy1lkwH0VN7OQaV9/xnIQz','user','ak_2f15ea82e5aaebef','2023-05-26 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$HJ.bYcHWKohQiXUUtJgJMzPlfuDbdKHOxAvDlE6LS8TL9vmpNhodn','user','ak_1b8af0568c778bdf','2023-03-14 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$cIz3yETfx9j0LUomSOjKxW43jmuvTcmCVg./9aqRLP3DfBKlGZYpa','user','ak_2f83064f2af112d4','2023-12-16 10:14:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$pjFqkb3dq/3RReVfh3A9uuUa0alhkyh4mP6N93OzbP8FkT1VDUPq/','admin','ak_ff68c704e37bb1ee','2023-01-08 10:20:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@company.com','$2b$12$2pC/kTJ3v5tiss3COPVL9IT6V7fFQJwq3gF8.c.Kfc12LmVKefZu.','user','ak_2be9fc516394e846','2023-11-02 10:00:00',NULL);

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

--
-- Dumping data for table `sessions`
--


