-- Host: db-master-5.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=41518;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$mISacJYvB057qWB8z2GIK3AuEnkPCnFlqPCxcK9Sepe9NMCGwpRTs','admin','ak_f1fbeaf809f89241','2023-02-25 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$KebB5bSRPNB3Fr9m4Gn5f6IqBWLOGgc5pGh0hL4L9ZlVgd1CFVWB8','admin','ak_79049599247e84e7','2023-01-04 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$YbEFMHUki0MOaFuNEIP0zk5HpIKEHlAn1QbtD4jtLgMN1bgtg9ZI2','user','ak_abdcc9c031d4843f','2023-12-20 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$qfXQbW.eXY3RA0klKWHDz6kqId.KhUsgmShVFgvE02kMXkXFHQc7T','admin','ak_0f7e0dcccca1ef72','2023-04-09 10:21:00',NULL);

