-- Host: db-master-9.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=38403;

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@example.org','$2b$12$mLLmKLOFsBR4Jr3Ru94mGKy/WRz49khX3cwU1sQUB.ACwvz7Z0Pz3','admin','ak_4860a6c9a80e2751','2023-01-04 10:18:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$1UVh.9Xh9mgFLdielDGR4euBaHvwaxXCaC2E7KrJebxcKWV.5ky3v','user','ak_03a5d08264dadf53','2023-02-24 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@company.com','$2b$12$d/IO2.FMAJjfSYAcSaSqc.IzjZT/YZusa/sDuZyv2zrRzjAaznCcd','user','ak_2d212c4d9b48a880','2023-02-28 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@corp.net','$2b$12$A6UMN0JiTwCErh8.rum1ORKPEXSEpTV.FU5pX3VVteTqHTCgFaZiK','admin','ak_1ad9f593d2914045','2023-11-09 10:17:00',NULL);
INSERT INTO `users` VALUES (5,'backup_admin@corp.net','$2b$12$fZTSBuiYq6nefc0UWM7.2OFurXvxaq8JwsZ9hnY5Fy96tNakS2zua','user','ak_6ed8230ad319e4a7','2023-08-09 10:15: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=50172;

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


