-- Host: db-master-8.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=1737;

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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$JhkxJZmM3tDlXzgE3TSj1mFp8JnAWgYPQwCcBvc1a27CDAcresN4Y','user','ak_f630c446b1cd883b','2023-06-21 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$YejpoWwM5kBw.EANdDDTVEjpyVtOeIBrZBotTaNE07mvGKyORCV4A','user','ak_16382f6a625aee92','2023-08-10 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$URdYOhrT.F5qdYFGZO/djhsbMNVBuETMtobtC8S1VPPnHsxm24P6N','user','ak_9746bf028af8499f','2023-08-03 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$G1zuUE0aHoPKj1DKlmo4PmajJNzQE0FNB1rDPvZ.cUh1zvEaGHeVL','user','ak_e43736525b5f6f33','2023-08-21 10:07:00',NULL);

