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

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

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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$V8nW7mIHDhlrWx2qmr7iWtevjZqi1rBuP3ClruXPZ3ZXYbZeJ.Z1e','user','ak_c00040d4dce59ceb','2023-02-22 10:19:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$qX14MTW6.Kz0BqF5zk/YohtdyqKaloVGLTwP9x7HvXo1hkyna.LyY','user','ak_357f0f606b32c6b3','2023-03-17 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$wVhq1W6OVITYpMRNP0PmqcQiBpYzHcHQYPaVpEUf2.SfX79Em3Udr','user','ak_6d086b1d1b3b003e','2023-01-08 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$MJwLdWozXN9cNAqpMjI.ptq5E6LKLPQs0bKJbnebk1pwnsOHL52kv','admin','ak_ca5d848df604550f','2023-05-18 10:04:00',NULL);

