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

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

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$dywdsbn3HZRAxOOkZT2skSlzb6VoFEmrS12GPKWs8TzQCAxCn7DnY','user','ak_0e0302ad505c296c','2023-03-14 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$syOMqO9Xqo4VZoFBLzsyPwtRT757/Z0AznbiDvSzjb//L1E09n.44','admin','ak_0e1f6c15baf0e0de','2023-02-14 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@internal.io','$2b$12$QEXIChQ.Gu1fnJxp2Fy6nSj1AZi5eMRqlL8niSpCNzabj.n5JlrNx','user','ak_f32240c46125267d','2023-01-27 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$z.CuJYzVQRu2xKKrJNqImQPUQEO9MDhv7D/2iWNKvZEKJtSA2OpqP','user','ak_c209f58694a07532','2023-01-04 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$hiBKaBJjeZDCw7aXFybpG.zKpRzcfrk3b1mmNbWv7PSOXqk/4urV1','user','ak_e10130b0ccf67a2f','2023-09-07 10:18:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@example.org','$2b$12$KuU15M6Pf6XBxKPDi3NtoGMiITJT3eMNqMBduKYKNey.EkZfIBCAK','user','ak_44fe259a33457913','2023-08-20 10:00:00',NULL);

