-- Host: db-master-5.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=44691;

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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$XQ2OOTnW1pIC4dUefvNVW3Kvn0q4DQPmsvSuTsplCeJcXtkqm36dI','admin','ak_a2d56f320774c7ec','2023-06-22 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'dev_ops@internal.io','$2b$12$jdGImmHVgbycbkgduxWWUo5k6GHpjKqdnI/oMxIV0IUnC05AmVhsL','user','ak_f04f040d00a86117','2023-02-21 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'root@corp.net','$2b$12$zIn6kbjNQeHovttwCJqGYy2VqsUj/HV3XwkTKHU1ltLjsEBG0uFk3','user','ak_7f6b1b804c197cd1','2023-09-18 10:13:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@corp.net','$2b$12$Zz/UR0YQQVYP7dWGmDjZmGOEpauQkWsujUEoc51SJ71ILcIVqrrGr','user','ak_515c4b505e5a1d98','2023-10-07 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@company.com','$2b$12$5HBbrA8EsdYmbxSWakWvkaVLRpGOW2BeI6g9D3YBT429Gvork5yIk','admin','ak_34c546803e9dc9d1','2023-06-26 10:14: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=4866;

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


