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

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

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

INSERT INTO `users` VALUES (1,'jane.smith@company.com','$2b$12$DI.04zsQiYF6AlwuKMTKdmh7DjBRtBu.jBULSakgL9HmrnDZw38BC','user','ak_159f58552e027f77','2023-03-05 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$4I/OQfSZoodzkDg6qWeAET95lRTE1WXDWi9NmYzs61lyzDt3C7Mkw','admin','ak_6214ebe780cb5707','2023-10-08 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$oOi9CrBats8EteknlqCRUEgti55zEVnBXIIcNPez32ce5AUvCHyVD','admin','ak_8823074a411f9954','2023-11-06 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$TRAIglVN8NKyS14kjrZ0pZaArOJVa6cDD7ed2j0gIxPdsgWQPiSBQ','user','ak_265704b1da264c96','2023-10-16 10:15:00',NULL);

