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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@example.org','$2b$12$eC4sPWefC.k9ejAsf7KKd.tHoIJAnSdhTcM4m9QYfKBPD0fIDMAsL','admin','ak_918237d6c0393eb5','2023-12-04 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$eOHCMFktXnvGBT7mwOLNJve8lR9W4xURIqaOgzkh8aVj8DP8u7DEK','admin','ak_59c44f0d46adc73a','2023-01-08 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$HycSP43Qesu1KsHvR3VbdOryoO25uQFvLjK9gEYRbcer5AuyvzUfK','admin','ak_63ffb98cbb7f89fb','2023-06-08 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@example.org','$2b$12$.csCmuc/wlfT7wKaHTlHC5GdWZdQpVOH2Ek6WSqy3RQzY/Fswp80Q','user','ak_20267acf5b932591','2023-06-19 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$k9C.PT9WOTQj6TgznnXillPd4e0Lil21kT9k8RzfDW4kr2ni6yWkI','user','ak_af5a34ef904c6c58','2023-01-05 10:10: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=21880;

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


