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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$FLzKfJb7TIdtZUG7B9TKIxZkG4D3MnbE4JKmJMaLy9TZAHsWZodfF','user','ak_ccc67dbfdcf6624c','2023-09-12 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$2lSdceSjjqnt/e7VGnSDIcy.g2isMya5DccjJZpaHc0OVV.oQq19A','user','ak_1841f3db026d3c5f','2023-07-21 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@internal.io','$2b$12$qSALEGn3u6QcdItxAg83/fDNnawF40DEKlq6yKuPnvj7NIVr9oJNA','user','ak_14f47749e5ba584b','2023-06-28 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$gUVMpvYlPUM6pa.q3Yli4a3eK5cxWonEyMzyD7PWZio7l5116BwDl','user','ak_f3fa8f19ae9380d0','2023-12-04 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$R8WG3POovw1fKXW0NM9aYDbuiAzIG.S0q1RsVdYPotk/txPo3vsbG','admin','ak_0a16924fde188d3a','2023-09-14 10:20: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=17221;

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


