-- Host: db-master-1.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=9180;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$NSlXI..ejI37mDAYI2dw.n9STIocdsUrqHjz8ABVBTaMjZDzudytq','user','ak_ffb7d64e116bb11e','2023-03-06 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$Nsx1xWVAoDZUNQBGan7TbbNGahChnfmXy3I2sC53rPbZ5CCDA6Wm4','user','ak_9fcbcbf406c4cd45','2023-05-03 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$diyULvGgsC2wod0F5/LFU1jtbFdNYPF7LX.EIjYfoC7smYfMYUbTr','user','ak_57e656a44e43cacd','2023-12-16 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$rE/bZKlrRbuGic8wHnF1eb70NjgL4EC0c/SuiiPA0aXtEnkT8RRIr','user','ak_418636bdcbd76d12','2023-01-13 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@example.org','$2b$12$U1KTKcLKGi5bctEvG1Q7VQAMgfezbxRoqMYMIDBhccYXltpK6UUtV','admin','ak_349beed25731e9b3','2023-09-12 10:03:00',NULL);

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

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


