-- Host: db-master-5.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$Ts3PwQqHJ.lXLlokNN6acE/lsJRsXYTOBQ7KDnKGFC.7psEvNpWKg','admin','ak_f3e376300be521fa','2023-08-02 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$p6oo5ZTnC6hEOuhB76FBhAKkSEnhMkV.ocTQ21DxCz812HmQE5Ch3','user','ak_509131ae9dea33cc','2023-08-10 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$Kh92rlhJ238GRE3otlBZ52MKwgtf/Fa9rDlZ.zifpJ8YF1/woD0/c','user','ak_c4281a1ad84de719','2023-10-02 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@internal.io','$2b$12$SWva3lNG.DSkcglpC00m/B9E0FhFJLoaS8ACulD.2EOQyd3N5dqEH','user','ak_874206eb86b149c4','2023-01-25 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$QWFJ81mxJnBTtySfRiXOvwLyxGOvUm/beu5mIJ843rWUUQhLm7lCn','user','ak_4170953833c045d8','2023-02-20 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@company.com','$2b$12$N.pzISk5Orhrptfdu/lYG/dhfwibtjqq2G6SE..UtYp0rv6XnUILs','user','ak_225a8769134a78eb','2023-10-22 10:06:00',NULL);

