-- Host: db-master-4.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=1204;

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$SJLz4c8YVJtRoHZltJ.FSu48tJxh4.mhJtH3zS.CFpaKwpB0W/.LG','admin','ak_c924f8e39939b55a','2023-02-03 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$6noMV0dn.LAYP7yWtbzlKKzaHQMAGazzWR3tLdUARWno77hUUyk51','admin','ak_e23f5d7744c1b362','2023-08-07 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$bn3Nr.oUTtZUq8MsBNqC1l0IUE65fuXR.ic8h5dMCrdaZ5LAKghr1','admin','ak_32caf255acba97b2','2023-07-10 10:05: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=43421;

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


