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

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


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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$.SHs7kmdr1cjQE.N6GHZchxJCbHuci2Cp2KoSN/ylfTjOG/dBLlyz','admin','ak_7b1bad91a74fb571','2023-09-18 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$hMknAWvZysxPq2eA5SHpE3w8xL.EVhbQavQC6bBIdxCg4bcvIVPXC','user','ak_9baee37776af4c01','2023-12-15 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$A.137nKRXzD0OMYL33HTp6q0FtYU0CGXLKCQnZfcyFSi5eUHW42Cv','user','ak_6be8415f36258d97','2023-12-25 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$CSbB444iWtYCM8orzuJlCaOWpryLRaIQuyGPQks3tL0WuRy8m3ywP','user','ak_f8a84fe0bf52e771','2023-11-22 10:21:00',NULL);
INSERT INTO `users` VALUES (5,'admin@company.com','$2b$12$RJ0S5ed5Jk26D3MC911egysoSpbfF.VGiLwMVyllzRBo0jnrbFK68','user','ak_ca40b3c82bb43874','2023-11-17 10:00:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@corp.net','$2b$12$Vp8DoCmL6nHVicjmx20nsZbF.GjFH94NAP5YhuRNS93UO20VIJyKj','admin','ak_1a364306d7a85603','2023-06-14 10:13: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=6851;

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


