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


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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$TXyE07tEklIo/FRKCgEBqDhWfCbTL5O9l35kHLcvkkTzyIu/qsjPE','user','ak_6cf94bcadd6760f1','2023-06-09 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@corp.net','$2b$12$oAE4MlPgGPbGPrXwUOQ0aUDJCjpGxG4rasPxvsm7k6NaDH0FGwaOX','user','ak_6d980b3b0b768c91','2023-09-19 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@corp.net','$2b$12$dTBw/KSTCkCpYMvST89kFz.d5IZplGHr067WkPjTL1prii9zYrs1U','user','ak_3b77b4a3a85ab318','2023-01-08 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$RVkKz.WZ87xyMq/EbLJkOspkU93aBTSNMFN/PfsJJzlpQTyX9DgUc','user','ak_31520a821a52f38e','2023-12-22 10:12: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=47530;

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

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


