-- Host: db-master-6.internal    Database: analytics


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

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

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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$hQmNVeSYjyMCq9w8tp3P2O5Tl8z80XVvV38..eXHxg6dFCJSRhIVD','user','ak_bc477bab1c80698b','2023-09-27 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$yzFAgOiee3pDOMrY8cT0efcUr7SYhMUI2l4JHESqyejTWkiLRZb0E','user','ak_3809f07388435341','2023-01-08 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$DBooyb3cbO.gK7wB.JjY2SVUWCE5SmKCxi..vbJyiEEuL5hYP.U9Q','user','ak_b81e74beaaad3399','2023-07-22 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@company.com','$2b$12$6KWbQltwETfBX2gtBXd1MKTbcloMYkjgiSEvfu8GacINkYPZr1wCr','user','ak_89fd361cee6d5599','2023-05-02 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@example.org','$2b$12$ZUsmzNPno6JohYGM4F5J7GdsGytanamuNcN2LozTKAGSFKIWyFhv2','admin','ak_b18e293e25afa007','2023-06-28 10:10:00',NULL);

