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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$/Q7uO96lErO0FZYnmGm863ZlluXmu8JeXaQIPUc2YZMcif2MRH/20','admin','ak_e14dc665f6f1f276','2023-05-27 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$MeCZuezFSYIfjhwq4f4wM89L8VzmapRoypLGleiZr.IFCDnda15lh','user','ak_eb245c7ba4438595','2023-01-10 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$wCpp4sfK5RNeAV0UKUGTNVwEmcQKMkWd1MhaToVFwx6WDoDeq0Njt','user','ak_0195a463bb730e94','2023-07-18 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$C/ULLRassG7TRrJZaT9/UYYjZwrRVf6H/4ahkNhO7dPSoRzY8zdNS','user','ak_8908f1d1fe8d4511','2023-12-27 10:05:00',NULL);

