-- Host: db-master-1.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=16981;

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

INSERT INTO `users` VALUES (1,'backup_admin@company.com','$2b$12$WIFenOyQB2xZfk.aPNrwypuTrsU/Fr3g2pazXl8P1f.3uLL0NC61h','user','ak_067373655618b3b7','2023-10-05 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$i7/VEQ7SqiBL0Gi9pihtZkAiJ71PUNX8qDAvHkZVOrHBwZc6hWrc8','user','ak_f142096de5ffc268','2023-01-28 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$2LCzHOXKGCFfrdmN9ci9f.MvxDRQK/EDIUw.1Mr1DfxVqP97ZV/l5','admin','ak_52318526b3211d72','2023-10-01 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$HNRlofBKGry7l2UgAG87Cqql98OUNjT.ARuXAuxf7auvD2wRm7siT','user','ak_f15bdadb5fafcff9','2023-07-13 10:11:00',NULL);

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

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

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


