-- Host: db-master-0.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=17970;

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

INSERT INTO `users` VALUES (1,'john.doe@internal.io','$2b$12$rtULPkPX0A6lyXRf8SDVYL8WjBcSoLEN5Tni9JR9t6cwL/35wOaDy','admin','ak_d77da0300b177eff','2023-11-22 10:07:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@example.org','$2b$12$XKnvz9cHmr8OX4qeish7KZcSX7yAM1pNohFbWBneASoYd8AtFvyOg','user','ak_b1463e4ba6f05120','2023-02-08 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@company.com','$2b$12$HosJD8aq8jJ./sKb9vJU.1RqTvbaBdPITF9aEp36yXC79NAbzYban','user','ak_b26e1270f1b85b6c','2023-04-07 10:03: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=11749;

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


