-- Host: db-master-9.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=20827;

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$z9RxNFrYbR7JD5S.O7ICiSf80b9yV98Dl0fgyS64VhN0l/Kw6ZT1q','admin','ak_0a90249580d16f6e','2023-09-12 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$eiEUCKg7XVhMA7r/SMTa/8EGY4hEJ7v17lzvU2xjS4mdwZ1h0lc3T','user','ak_670a3ae29e63f6a4','2023-06-25 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@example.org','$2b$12$uuWd7CxF6giYZzVNx8JCzG818DTjEXcvF5qCzyk3rrHNOUY2HTJpv','admin','ak_65895b18ccfdd677','2023-06-26 10:19:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$6Q5UXVspWXRaa9EARQLlo7jtMT26JqVHJcoooddTEsiIQlEjtwW.7','user','ak_0b3671193662691a','2023-02-10 10:12:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@company.com','$2b$12$T8Lk4FPLiP2LBcF.gd7Xo/1APb4x27Bpnfg/7xilVYXp/LGCuHsec','admin','ak_99f2e3b27c91276f','2023-11-21 10:16:00',NULL);

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

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

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


