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

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

INSERT INTO `users` VALUES (1,'service_account@company.com','$2b$12$wHFbLzPl4Bx9/WNUzs0EB93uMkyDu1qAjL6yPqPkaxioGUi1kHiR0','user','ak_bde731a9dbbc3686','2023-12-20 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@corp.net','$2b$12$0HNaL0jDAV0LZARkiAdH6yqp36L5v53svNpmpJe7LFwYlKqR68Ael','admin','ak_f9eaa08af95571d6','2023-05-10 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$GQkDn/LPEvFTcyedxcnrJ8gChv7bKIfg3EIQjWA9/43f6OBnGUQk9','user','ak_994e5fc2ce268474','2023-10-07 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$ove16pPMudc.2ViqdrDoEDxNOsji3zacK.9TDcKhXi/CBQSwIg2SX','user','ak_a7130249b577600d','2023-09-07 10:08:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$Jx.gHdUp5oSK4N6IZzf3P3cMJRzM0JHm7p9Fbykp4zHFfR54NpJmT','user','ak_9a5ef6bb32ead9b8','2023-01-28 10:07: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=6402;

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


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

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


