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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$59vsNi/0S/a9AXHqaF7IcTrZJni.JY5f7wJDrBnH/OQ95Z8IejSTt','user','ak_3b2405d546077834','2023-07-12 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@internal.io','$2b$12$fDCT0tXYoMGIUpqlaPvPLtkz1vOjoR6DeAykLKDmq/g./4.xqHfmJ','admin','ak_07791ef2b9107821','2023-04-09 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$KjZsRD7pS8sMASYZTcb12zCt00rbg0.1ZeQnYxXbWGgElSPlmwUkH','user','ak_bf0e398a338b3b96','2023-01-18 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$64YYOBC08sma5xQlEG.FTYVdixswU2DuFb/VOdbHnMtvUgfUNmxj8','user','ak_caca50539ae73133','2023-08-27 10:03:00',NULL);

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

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


