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

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

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$PMoSLFfdT35hEoRWD1LDKKFryDxYFHhtmSi3dX5nPxuJPzZ/lddZA','user','ak_a35ab4fc4748835c','2023-04-23 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$FhgNE9LPkCc1.ZxhWqpXvTooV3MZikHJTC8s/RnyciGJdDewTdxTA','user','ak_b75814a9deb824c1','2023-09-07 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$P7OiARXBrBcDNCnQ2zxiyBh.iZFLu3y3A1llOJvBzrEJ4x8laycw3','user','ak_636424dab113649a','2023-07-26 10:00:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$U9KKR5MS/rC6cD3jBReMQS2NakP0pe.BnuOmk5k04Xkxe81npNTlH','user','ak_5b32a0d773fa5db0','2023-12-06 10:04: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=48852;

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


