-- Host: db-master-8.internal    Database: analytics


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

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


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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$7gHIO1lq3tOkmj68vmoeSDiV7QeqFTw19RssTWfh9yg.NH6Bb4YeU','admin','ak_c5fb0c5ca40b096a','2023-04-07 10:02:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$IJ74HoB0pQf0pHP408Ksaagy/vpWgJBp916e/d78OnNDNCulG2qlO','user','ak_b2d8f4a909a6fd54','2023-02-10 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@example.org','$2b$12$GPKM4rffTIXBbQrinTlX4axmVZ7cl4C5jZL0MhtvIMuN4ReA1HCO9','user','ak_81ce89b2593825c4','2023-04-28 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@example.org','$2b$12$OXhPqJxhOdwpopKNWxv.HP3j2y1qeWbXhkJO90dkd4nDMqW0s434F','user','ak_592facdb0bb74c5c','2023-05-16 10:06:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$WSMuKZt/.mHv3eZIQKbs64c7YnFCiiqxIQOl3M6eLbDkdDtCEQBKP','user','ak_7e23fbec596b45ed','2023-07-24 10:18:00',NULL);

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

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


