-- Host: db-master-4.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=28342;

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


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

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

INSERT INTO `users` VALUES (1,'root@company.com','$2b$12$xU2UbOV0sPZlAMTYypAq/PrJe00cMpFd/POCnO6fQ8YIizu7rI3nC','admin','ak_0961150e8d3265e4','2023-01-07 10:21:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$Cv5KLPccaSG3CZjUZCOhy6FwuRZwvk3Xh8aCq1605lZIGcKGIqAGe','user','ak_f97238cd028b2867','2023-04-16 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$/idXvH730IRtsPdVVcx8NgoPXtMmaGTAA5ge2JHFkImdPK8e1KrWa','admin','ak_5f7f30ba0968a1ae','2023-10-28 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'backup_admin@internal.io','$2b$12$dxBasLWgexxKJXM0zTZ2.BXvvkij97rJjnX1qUKvAmGfK0ITvPm2i','admin','ak_b5577c8ac1bea3ab','2023-02-21 10:16:00',NULL);

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

--
-- Dumping data for table `payments`
--


