-- Host: db-master-8.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=45758;

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$FfPBvqp9wHVv7JbBTW6J0HmNCW9SeiZKRL2Vfu1guzBmBIQoDgsNv','user','ak_ad6489e1198ffaba','2023-11-02 10:00:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$HdRoRHaU22snZbWpO.g2EEiVb5dtzfWas0uzbOyoQUA62ybpFicSa','user','ak_4cdf7cd83aecd6ef','2023-03-12 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@example.org','$2b$12$IiZ0HybKuZdhwv4jkH6BIWGvoCgcM3uSsu5InW6dJIS8okCjZwQJE','user','ak_137193fc20551023','2023-05-28 10:15:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@example.org','$2b$12$2AA6i4b3EOQ/5L2GHozY5GlSRIASEnMzi2pe7XFXTXjSMr/dGvFTf','admin','ak_b58305f874fbb718','2023-01-28 10:19:00',NULL);

--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `data` text,
  `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=48920;

--
-- Dumping data for table `products`
--


