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

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

INSERT INTO `users` VALUES (1,'root@internal.io','$2b$12$o7qO9u4atNiONnXHrCoRChjiiYOW0SkkE669pXB/3WNgxRW66DKuD','user','ak_6f37d13cfeb295ba','2023-06-14 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$WZUzn5BrP.FOq2C7kxWxu8dkPxUzxauvP9Wo0zAPBeEJGz/DS/NDm','admin','ak_215af2bae02f1e2d','2023-07-11 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$w1C63Wu8yIFs.kd8CHxALrc0/sZNY/x4ecZdBIBF4qozgcUBke5r4','admin','ak_adf3852cee5cc458','2023-07-17 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$CVVHw6ceaYsAVU7hgntOQyWerjNhqO0oHGnPRPEQACNXt1PtaN4EW','user','ak_2f16749d365f5200','2023-11-12 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=10321;

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


