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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$xoUdOOT43Y6CEdls3fPE7FJiltQehc2e.WAYPm1DoFZh9c0jcSxhq','user','ak_bf80df4e70c9bec3','2023-01-26 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$deVc0VqXgkDu0PugqXE65RM/J7iFYLg17uQ3/ny/CmM2RshUVH6uy','admin','ak_0e9eac3b0acb61df','2023-01-03 10:00:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$s6Efauej81D0vWlFA7CQUzWasaBFWcJUVevxAUt2EuCbXhoU8Z3hj','user','ak_b169f789ca46c6cc','2023-10-09 10:20:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$EKMr0MI8gOjj7hgux60G/NqZWyOK9tL/GOCvuC2wTvrPI1dTLUDWe','user','ak_1202b3b6bb36f6e4','2023-05-19 10:09:00',NULL);

