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

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

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

INSERT INTO `users` VALUES (1,'dev_ops@internal.io','$2b$12$bhl57rukQSc7AWxXu57BFNlo9jPlKgdgNYhmTLThg.kfcHVDbMShA','user','ak_444b73bc6adda3ef','2023-11-17 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$d1KIRzfmj.YbJwgbEkAC8KbVaY.Uqvm5myZzzIYrEYugLTiDTdxnU','user','ak_3d2041f4ea964e8f','2023-11-02 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$vdw1gGXFqMrZBBMORXdyp8LjgFqU22fbgZ8EB.XJjo1IZqIED3gWL','admin','ak_f10cc334fd691568','2023-08-16 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$sXUCRAD4Ww2HP90fcBMT0HaGbAlLo7huVzoL6IeJ4gzPd0C0OI6Dq','admin','ak_676cfd72389c9c96','2023-03-12 10:00:00',NULL);
INSERT INTO `users` VALUES (5,'dev_ops@example.org','$2b$12$enl8eyf6rj/oIvo7UbJI.suzy5OTCUHZ/6jdRQdvpzYwjP7av3fKE','admin','ak_aa63d4840a1bcb90','2023-03-06 10:04:00',NULL);
INSERT INTO `users` VALUES (6,'deploy_bot@example.org','$2b$12$24wG.VkVxhi1OCz2nLXVWUSZhPBO/n5ZKO5n38eFmhNIzJ.Afc1RH','admin','ak_eb0a29e3d553a33e','2023-03-12 10:07: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=22440;

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


