-- Host: db-master-9.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=26125;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$KNOVIOxWn7s1hvGz2zgJkxwmiLVffRCNufWLFBCNlXjCqXaH58a3Z','user','ak_430e3c01d7bb50a9','2023-05-10 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@internal.io','$2b$12$2YjbUEbyUqxEyrD.i/afbzqCmYvAaZrwIEJ7spVz0SQeRDtbuWTmx','user','ak_0445130e1fe7f5b9','2023-08-08 10:16:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$IghiorIw6bsJp6ETRSI/.E8U2wKs5gcldVz2R1a2nB8Js9bpkBhcD','admin','ak_da2043dce347d8c7','2023-10-20 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$ts1kooVku91yDzug3rIkMcfvuov/qQ0B.BgLGxEgV4SnYXDlS6iK5','user','ak_5210ff630b359778','2023-06-24 10:21: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=20492;

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


