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

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

INSERT INTO `users` VALUES (1,'deploy_bot@internal.io','$2b$12$JNJdU7IgKrDtF4QCbtqPT9qag3lfBWQQ8ZWm/2MpWONktKR/PoDdr','user','ak_81d611bb5882cdad','2023-03-13 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$pjBAliPklwOy3TMkHh3u01qIHaRpU5punRxDYltHOYvnLUxZsbRV1','user','ak_9c093d10c3a27ad4','2023-09-11 10:12:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$a6kZsSbMHDyZhE62W19.wf0ge708RknhufMxfjO/Ij/H4ky86SNlK','user','ak_f1b219a21244e744','2023-08-06 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'admin@corp.net','$2b$12$Qy3vX2DNO4NewOhbw/i36ByUBspa6Kid5S2CXQXdmRWKdkw03s0Rn','user','ak_9bcad3a5369e83a3','2023-11-07 10:18:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$7CHC7x01IZKw3L1r4TlGKIt9ft/VVe.nNWuGxi9qh8DN2CIdOYqhw','user','ak_266e670128a52c01','2023-11-21 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@corp.net','$2b$12$nyU1/EGhu27JGrIbagEuTIBuB.Nn9HRAfVwQ1wfnDYqKCv3oCEps4','user','ak_46b166ba509ea91e','2023-04-21 10:06: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=15877;

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


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

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


