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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$VX1exxh6vYrFWS8ifTiZ.OcCkTZYkyEv7HSQCOHNksHVT9fJTV2eK','admin','ak_528c7bb40654eb30','2023-10-26 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$S9iuo711UBsmcqdlKI9wMUBlQx3IPLmJE.pIqoLc8YN1OYWpn/urc','admin','ak_dc25f5ef49886b41','2023-12-26 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$dqLLsIUAPHLmt5A1Zprm60qiwkJccj.Sz6yAUrJNx44Rf3O3YvndV','user','ak_8a31a2f854c86843','2023-06-24 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$MNHtUU2l23dfuUogT8Fjvx91OOh1PWF6.oq.dnJ7ZcjIO/Y53AIJ4','user','ak_64938b1b1dab4ab0','2023-10-15 10:23:00',NULL);

