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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$xsm.DNTqMuL9DNYqtu1aERpPYKUxvcyVeij57DEPVLpHH4Tnj/iv3','admin','ak_977dba70733d7079','2023-07-08 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$cRC7Zszn9IIwF94OOQxYbBN1Dq/zvHCu0kOjbjQ5CM4QVFSXPlY5Q','user','ak_bcca16c4a3b75755','2023-03-10 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$JasDPq2UChdJWxcV8/vziO0cPn5BcWfnaEpg18Q35fnhJ2NI4kq3B','user','ak_7ab8c88e1073eab5','2023-03-03 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$mpoHRHutTB.NQ4e5k4guFDi4v3NwKffwkISGz1gt29AOCXbs.KiFP','admin','ak_4684d99ba3e867f9','2023-04-23 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$ZIhx9221uzfkKYWYBslEckXfs/EmI8T/2ChfQIn5U8fQDp7bQ.u3R','user','ak_225ed94e4fcfdc86','2023-10-25 10:17: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=30373;

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

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


