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

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$.d2xlsW.TnPRM6gd1hQ2y.o4M5wnuTiNIaHHe3FYn10cxIkZetfmf','admin','ak_92f657421a27361f','2023-11-07 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'root@company.com','$2b$12$GL3oIcANKGYlWFl8YWuPrFK5GMgt7eATnkYfSQta4pP9ieJB/gORD','user','ak_04734287badf3b5f','2023-07-20 10:05:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$V3pGMBsYgqUVO55W2KX5jo7djW.IyCQDLO8wHlglTCNl/tIwIxXzL','admin','ak_1599461c09c9d5e7','2023-08-21 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$5meOj/hKSdK9nQWni50B43Rk7oCMhYTX8LQRAdVyAY4coQFz6KXQO','admin','ak_f998abea9ed3808e','2023-06-07 10:04:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@company.com','$2b$12$Z4DVH3nckqYZ7wTI84fmzXZRt1wuwoeNaNaRq0S/B7ZPF8OJBMoTa','user','ak_fa63c9919da7cab4','2023-05-28 10:00:00',NULL);

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

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


