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


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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$RzfDwEhaSt5A35tGfDNVB7fPDTz6Fcdb4XlmllJ4EkYv2gG/Sf0Tc','user','ak_e4b4799c6a4b06c0','2023-08-12 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$m219Sp6nYnSaWu0iuPIjxQ4tXpg523qeN1TnLpSCukVzxA7BNfqdc','user','ak_5b5bd85fd1733df2','2023-04-06 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$d1AyuGj5OU43OFIiWREH.3G6y9xHANSHg3929Gi/6UHfSx5sIUkhn','user','ak_200d946fa14059b6','2023-06-06 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@internal.io','$2b$12$/huLTqZikZUJ2irdBjAOAW2kl0esuKX/N.mjOhA7iJ1RsTGHgiv2y','admin','ak_84f69321c44d1754','2023-10-05 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'root@internal.io','$2b$12$IY8J0T8n05sGEt0I5BSWWOnATVCyvagBKBJ63RBa74LhLur/2lRRl','user','ak_5b2df0f787ef2841','2023-06-06 10:12: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=42596;

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


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

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


