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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$re7anLmLEs2MVGp494QBcNFkapbCB3d3S0xiuUel02rETIOgy/vP1','user','ak_ff472664d4039426','2023-12-18 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$jRSdbmOubg1BFr.cPDvlfOxfdMCQ0SZe72Z6DC186ntG7VwKPovfZ','user','ak_641868ee5750ff11','2023-02-16 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$lcjzAaciQy5tZ3RSLglrEQICaIJVYqraSyRy6vcvwTvNEJRwGVdq9','user','ak_b1fdf7493a6afb46','2023-07-13 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$KA0OkD7ZmKDce788rplghLrGDUztB3mjzt6gRGqXFUE0aIOTsSMF.','admin','ak_7ab2ebf59b17fef0','2023-08-09 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$eqIe6HLlTpjVOZD7Ob5j5TE1mW/cET/0sAhTvoX6wUhCMP3WEDFdk','user','ak_a6c63be72f3e10e7','2023-03-05 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=24539;

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


