-- Host: db-master-0.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@company.com','$2b$12$n.BaUMn6pksumbHabOkYI..fS.6TzvFkMaN0zLNpx4q5XesE/.9PA','admin','ak_06dd63645aa036cc','2023-06-15 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$7eB1gr9hphlVtBmIh/56/56PP26FW0EmGBPUyKzQuyz/YECzQN8cz','admin','ak_58dfa80f5198e491','2023-07-12 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@example.org','$2b$12$RccwjmJSDQbsbUf4YdUMkgYpaYPZDvYQIW41uB/3z0SEJ5RUfXVgg','user','ak_f1aa317dc8625606','2023-06-09 10:08:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$q4eLyLMrTRy2HyGeL94vmIAwsrDMJ16oEyS0FRhADznENoR9.1DKt','admin','ak_56086c13e4e38ba7','2023-06-24 10:00:00',NULL);

