-- Host: db-master-2.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=18095;

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$tDj4pX1nXX8pjCL10TN/1.B63z6nJDhJOaZYTGIEDWR8EO6mc9E47','admin','ak_c721b70295533616','2023-02-05 10:01:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$gObtOU0QTmdgq/DlP3hcpFycQm57A1JJZsNCVRIiBNHZIVmrip0Hp','admin','ak_69779892a4024104','2023-06-26 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$0XhdTnRl5JtpXTuGokUTfTYE1hzazQ8bFO5M5RLsjLYsjklUxyjZR','admin','ak_0e475afe6eab0fdd','2023-02-17 10:17:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@company.com','$2b$12$wXPKseTHuXb6oGaW.0jzhIn9SseWS6m3cMtvfm7xKxSoEuNbDl1ql','user','ak_a30f5241a48cec3a','2023-04-03 10:10: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=41499;

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


