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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$rSKmwksKb/GG2hW8Arv7OIBy3VDXd/NRtMTFYnPuCg89O9VdX/pxZ','admin','ak_0cfe1633a1c898a3','2023-09-15 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'root@example.org','$2b$12$hI7dSUnh3ow6mf2bAOR2iflVmKwCpozG4ZRjYVHgSY4o1t14tiddI','user','ak_08c5eb92cb640308','2023-01-21 10:09:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@company.com','$2b$12$E3xstOFhj8W9IXPgWPC3CXO6GeKxk9gJQvAwIxCSAD4PFXk4zpgtc','user','ak_f89044a0f268561d','2023-04-23 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$QI.rSECWCsYlybEPJo.rkIcs4Rk7BLbWQAJmEgKr07fJS3vq0WEFM','user','ak_afec2ec52c439a30','2023-05-13 10:01:00',NULL);

