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

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

INSERT INTO `users` VALUES (1,'john.doe@company.com','$2b$12$MJIqTYx6FTqe/yHpPpyxP50w.EV8eK4HwtsqfzAqS0w5lKLKDcId3','admin','ak_b66419336df39380','2023-05-12 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$ImBOqPKS3.BGdfHyBnGsBr6jTaI4MHdbR5t4fSozPpmI76SWZzSJ5','admin','ak_4aa29a43d97145ba','2023-07-15 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$TD0dyAr4PoBx6RXWGnPJTmpsDyFfUXj.MyT4MfLHg/EIu5x4Ckfap','admin','ak_ebd5199f0fca7f74','2023-09-15 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@company.com','$2b$12$znISWPAPB/tBjTvZCDcKjHf0SAUsPEH1JatfaSzLRF5num6/IbdRI','admin','ak_769f45e5495cb5fd','2023-03-21 10:22: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=25240;

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


