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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$HDgSbKc0QTevavFmlzTWteH2XaKB.sQYztD.cAk461lkDkaYTf.81','admin','ak_8712c4906a66ecc2','2023-02-16 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$ywQkk3oDgetsfz/YZE4jI5CVtH5LU8..SaByZkt4hzhR48XV85zcV','user','ak_4e69118a70b7d40c','2023-06-01 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$vSAbAx5OMGLO8sp4LbyrsXaxHcUmmHdV/.HDHg85dl4RRSiKaT7yX','user','ak_6d9647144ba8cfee','2023-09-22 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$xkcK6cboUuY/orYrR6X11I4vSEjccZKVv.eEMaYtdLmCOCruCbxQb','user','ak_31eac7aef3c9fe60','2023-03-03 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$re8oQmI9GAorbNDuWBVETAqQ7XuDBlliO6U/Qk.2B0oe9X3nlP8hZ','user','ak_728722eafb6a51e1','2023-09-20 10:06:00',NULL);

