-- Host: db-master-6.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=49108;

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$viotb2zv3QOLASYmDPtPxVwmVpnf5KaZIFzaVyn/NOVRp01ylIyKu','admin','ak_4ad7e6665e1da22c','2023-09-19 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'admin@company.com','$2b$12$g7CTxE.8B8gTCv7bbplBuF0ZQ9V3aqcNoXEY5t9QiU42/GxF5ZS4g','admin','ak_81dde799ec041a87','2023-02-02 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$sqQHPNaxaRsrlj85zcZAbg9CNDvPISJu0/FKqscAFJisfhYvhEBYa','user','ak_a68c2cf4b5613928','2023-10-23 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$Cwg66uaOcWkb1hi5FNvUglVJZ9NzxS0Lza2vq5V6gY/AibvmizrJz','user','ak_dfe6a9aa79d1cbfc','2023-09-26 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@internal.io','$2b$12$fUSDLmg7sDkKek1nxamBh.fT/Q7GtrNcyEef.WJBDSHzRD8ysswEy','user','ak_f26e8d89d03df9c6','2023-03-18 10:20: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=42720;

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

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


