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


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `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=40342;

--
-- Dumping data for table `audit_log`
--


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$Z.y8F31Qji/XQgt8bJbKO4vAwG0n7ZYBpMlo.XIee/ElP8nPLaf16','user','ak_f382b6a8300c240a','2023-04-18 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$Jj6lVKFf10HvH8IRu4aU6wsYhUCv4Egc8zmlTMzwmWt0J3BxMsMeH','user','ak_bfe93bc4a7152c7f','2023-01-23 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$w8ziAizZNEaDboqFN2nye0.J17s.nd4D0/E0g8XUOs.7YP7SqVFug','user','ak_9a7aa5f5b1a91af8','2023-02-05 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'jane.smith@corp.net','$2b$12$E3xky05IPGYO3KDdrJ2bnfsaVUAOZscqTpAnJXsYRnbKNhnIxFIfv','admin','ak_f6a234ee8ac95af1','2023-12-19 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$fNm.2s9T19y6aJrqjmoeigfyamC5jQXnpUA2OS3ys1RjOuj6SxlEx','user','ak_9f99438b1e99d8eb','2023-03-02 10:06:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@corp.net','$2b$12$MMUvJcorodE2UW9oWK9nGJHaqNuz1vy7hT8LBkHVhofu8zg.Dib4J','user','ak_ca27856a69ce80a0','2023-06-13 10:03: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=39911;

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


