-- Host: db-master-9.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=43538;

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

INSERT INTO `users` VALUES (1,'admin@corp.net','$2b$12$NnW12hZ.v0HCNFx9NZzMi3VXaDpTBPaCqKRFF4AEeFV8OHszGAHcg','admin','ak_1210b86f7d782616','2023-09-05 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@example.org','$2b$12$6LwVPzhBFs2vg71TituEmaPNlMaiLYU8GnD/AZN0g4L8K.IdW6sbU','user','ak_88204f92efe8e5e5','2023-09-19 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@internal.io','$2b$12$6d1wG3WEHVYPOOh9VeYYfR4Kk3ouZtSFISm7zyzRXg5zMAX1tWUTI','user','ak_1cf546e804c20e45','2023-10-24 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$XA6MbLaCariK9hq2vdzK/2jgWv3GwG0tEs0/RxQOt6PusECAJjsyh','admin','ak_2b2824189e5cf6ee','2023-10-05 10:11:00',NULL);
INSERT INTO `users` VALUES (5,'deploy_bot@company.com','$2b$12$5zyjAIaW/snw3Rgg7VZ9Mqa.J1CvRorjxXAY6Q4uwzrpXKpy319G8','user','ak_8f76a565f71d0105','2023-03-15 10:06: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=6391;

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

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


