-- Host: db-master-2.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=2195;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$TW37lQWfMK4ytCZMf8gTUML.bB5uKr7sdBE7cLVEpjUlFhT96REB1','user','ak_1f2f1be2234ead3d','2023-08-11 10:15:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$GYo2ToNK5.NB1/FyQDr1K8oYOrJOVNoj7w0ktpU4drSO2hr/qvWwB','user','ak_6b400fcc36e4d267','2023-12-15 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$qCEP6WTv2Xc9CwFecr2GlFwi/nBOVFOxV9neRDN2/a8V7y6NtMlUz','user','ak_ab0bceb8d62a652f','2023-07-03 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$PIBjRK609SgtS5.mwuGnPC/fk1dZitG5mWWVL04YubWfnM7ZK/vJi','admin','ak_2eac9bdabee188f6','2023-03-11 10:01: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=30355;

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


