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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$0qtijDbEPH5wbSceY7timapmb0kPt.mLELU6s0eIn1n52UcmK62FR','user','ak_c62f28b9eb36c1b3','2023-08-06 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@company.com','$2b$12$HBOy6Od0Eorspuvx/yKma1xsj5M4LMGI1UDCuiUD.Hx0TjHOo4Ex9','admin','ak_a5e032a39436926b','2023-12-03 10:21:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$wZd/UkjCUfcA16pOv8x94Wn.sycj4GG9gG93mgK1INOnSKQ8tuM59','admin','ak_7b76dedb4966174d','2023-03-22 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'dev_ops@internal.io','$2b$12$uPAUt5QGlvpHGpep4BfAyJMzshboZGNxfLuolOuctXPrgUBYl8VY1','admin','ak_c02a22e0cec9e7cc','2023-03-17 10:04: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=28984;

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


