-- Host: db-master-8.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=2178;

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$6hwOHSVZvIvLpbMqzT4vWuiXq/ChsAh6ksi7j1bVJmfFpZ.HrKR4I','user','ak_0d07e9a2e7c38c45','2023-10-28 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'root@internal.io','$2b$12$oDuo7cXmJcJpSPfaus9yxH21YpgYVCR7uQJVm26VT.oVM2DP9gu75','user','ak_194b93534e9e4c79','2023-11-11 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@example.org','$2b$12$wepMoksxdy73IEQhgL4vEcwtuYQh8v4U/uEcW787ZTQcnpGnXUUnu','admin','ak_c5787fb82be4e698','2023-01-10 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@example.org','$2b$12$FWvu3jIEzx7OP1BOa294PQ8cOmYfpScZ/GnsEERUSQnl1c.3M/cVp','user','ak_67ebe2793c65bbd0','2023-08-02 10:15:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$F79iBPgOmY3hC/LWEujwJ8Su/S0ZmFRFeF8Ttwpmlv1Pi8bDDRb.d','user','ak_a0add5284fda34b9','2023-05-06 10:09: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=1591;

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


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

--
-- Dumping data for table `audit_log`
--


