-- Host: db-master-0.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=6458;

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$k9nTRq/W2/YBuSC8nQeQt6kfT7EHBCIU0qgPfAdKqIzFzIAxI3T/X','admin','ak_3a83ea37929a3272','2023-01-09 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$ge8VLbF9kOAVkHeVJeBrgaxWKUJ9o1/XsXqWUqeQciyPbmL7/oR44','user','ak_76819582c492cf0a','2023-01-10 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$DXFTpFMFdU9ibs/CFDu/z6ojiWO/hOA5uRt/OtEzf3Jy34rJAukbA','admin','ak_c1faad9bb1b4f3b5','2023-03-26 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$lnwM9q6QnXYNu796GkvGm96zfJsqZU7vpjVl16V3jlmlkVO3deJ6q','user','ak_0daf9ee9fd887e83','2023-01-17 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@internal.io','$2b$12$PbY0rSnIz9QOmSHcVudwXGExyEggzZWqWCm4PiM1XpwXw032Fv6tk','user','ak_6938a1776cd7922c','2023-01-26 10:08:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@example.org','$2b$12$s856v.N.f1s2QpD9dCW1maCIBANvWwYQmhPAGP4F9Abu3S/AmnW5T','admin','ak_a14873bc1cbf42f0','2023-02-06 10:19:00',NULL);

