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


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `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=16741;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$2prfevJ4H58wlIxUZgdutoSHIccSr8DO8yBsbfmKuup3d31h967.M','user','ak_65453580ef902275','2023-05-18 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$W72o6EW9.wwG9hjQg88UAZa/WNHDD/HBdjeY7l6LaDqrOsa9dqiB6','user','ak_7973a6811f9accb4','2023-05-17 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$a5Hu9wb/JTPrLf/lyoHZ6aL1MF6aTRK0bMEQ/DQyj/6AL44xJqlEA','admin','ak_0f32c103509c5ba7','2023-04-22 10:11:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$lMCRImXFAgPWflaMR1lloXxsTFfH99M1BctrCkz2CoL18USnJ3elN','user','ak_7662b823649d20c3','2023-12-07 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$Kxm8JZj9wBFawnXBJo9gdJRZ4KUVTQ0kPcJnhSs6saBzEhOylSh8m','admin','ak_ee775e078913c650','2023-11-05 10:11: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=40876;

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


