-- Host: db-master-1.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=2681;

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

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

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

INSERT INTO `users` VALUES (1,'deploy_bot@corp.net','$2b$12$1r4ip9umXp4Zjrl5Htg5nNiAEjaaga.0fas33y69nb3vIBnbYx2bG','user','ak_b058239520adde92','2023-10-17 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@corp.net','$2b$12$j8yxLbASTEgiKvY34IPSfcyNwONJuN8aqQrheuvTmlvlxg9ZcPXkD','user','ak_c44e3a7dd3dfa4b0','2023-06-26 10:08:00',NULL);
INSERT INTO `users` VALUES (3,'backup_admin@company.com','$2b$12$JBTVv26kUxKeoMkGG4D7fC8pDNhQKlvvQJQjCq46Z/RXnZmyuy1WK','user','ak_be845929b616576c','2023-05-23 10:05:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$YdmFsko7ZfGqPUcDpVGUAAifRKyCet1NOpEdEtKsij3N/vkXNIwcY','user','ak_a4aa76f055546627','2023-07-10 10:02:00',NULL);

