-- Host: db-master-2.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=42538;

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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$EOUurU7BQFFgcCPEVDCmU/8qaCTP.8LkKXw7aKX7s4DR92.w5T3Gz','user','ak_268b8c9f930af6d9','2023-07-16 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@internal.io','$2b$12$1.bLBJHCFTgy/lAzmAQFeMsrZrT.hWkLGdTh2a2rXRM.49eSaQNc9','admin','ak_715338dca224be39','2023-02-09 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$Gv02YTSb5NANmMLLg4c5KgWjTtjKXrZJi1lCPYmGRcL4yQLEtIjTU','admin','ak_8e284e940ff40723','2023-09-20 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$yOPK8HOKacbASWva4PtmXeIgpbBfTVWijvlTqI61ZzrM4L0NK6L3h','user','ak_3ce9f626e35ffe07','2023-12-01 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@corp.net','$2b$12$m2viqrR5i45M6.seYhC34qIwEG3ipuJmNB8QkDVwGZWDvHlkVr2o3','user','ak_2a868b8240d31c64','2023-06-02 10:03:00',NULL);

