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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$G5NdiQYqzOpczT2XHTB/bw5tkPsRs5BDpADitAzWmjFEQxPoHmnq8','user','ak_3724b77098ff4e5e','2023-01-02 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$VITE68duZpR8VoQKkShx7oCs4ll3kph4olMJd2mFaiX.ZcLudOKtP','admin','ak_7fede3fe67111ac2','2023-11-28 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$LUyS5jGG3z/oH05k7J925kXo//M4lEsMaLSqJIz1Rt/GFyTpG79FY','user','ak_6395a96e9fc59123','2023-08-26 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@internal.io','$2b$12$9bYL56R78gHvLt4UCGbp7a1fLjyN9R8rtORelUhF/2OTX5nxpGZpk','user','ak_32451d0a354bf86a','2023-05-18 10:19:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$HSF3tUmdYCpNYwcizw15LLSB59nNup4CF/1NsFPk5uLVIBkmEQ7uV','user','ak_cec08ea841b8a776','2023-09-23 10:16: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=47793;

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


