-- Host: db-master-4.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=41786;

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


--
-- Table structure for table `payments`
--

CREATE TABLE `payments` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `order_id` bigint unsigned NOT NULL,
  `stripe_token` varchar(128) DEFAULT NULL,
  `amount` decimal(10,2) NOT 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=45719;

--
-- Dumping data for table `payments`
--


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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$GY7hXMkchbtWI4B2hjL4jZuLwSUftggt/X55B9xYQbNglWJFl3Gri','admin','ak_3f1b8ec5b167712e','2023-02-25 10:10:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$pYLDWUcXR1diZeJMTwvU6DwN476jRtbcayMM2iaFMMa0Y2Y1Sa9SA','admin','ak_27271061a26c8dc5','2023-12-04 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$h91011Ocjyel.FyKlwKPP6lbfkNpSxbR9IYokhyhAlvLL0EveZ1js','user','ak_433e3ad74ee76e88','2023-07-13 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$xQ6Onw4fEb/DOFSHVlfBxeaiad3S7MEvB30Wqk.R5PuiaOwvbDsfZ','user','ak_410d9d1d40726d9b','2023-06-10 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@corp.net','$2b$12$27OUI3RT8m757dRe6vRYv2/RNJpLLNZwh8m/9u.gEqCm/rXFOkJZQ','user','ak_2dce03220127a4b6','2023-08-26 10:22:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@internal.io','$2b$12$nBpq7HcR6x7FhF8MMuV5XohpGdKEqVDFuVK.6bfXL59/EkNGn.DOk','admin','ak_352649d3d2fd5549','2023-10-06 10:23:00',NULL);

