-- Host: db-master-5.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=8776;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@internal.io','$2b$12$thztY37eLqvY9etOnEpVZbBMg2FBIxYwkE99hJmpnMndAFk4zYm5k','user','ak_5dbe7627bda90d2e','2023-01-17 10:11:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$pYzfaoRKwF4q9LDJeCq.TUcXEb0oa5SSFrMPPWyuCjADOZeEe4MBQ','admin','ak_7a8fe2e7dbc9b14e','2023-11-16 10:14:00',NULL);
INSERT INTO `users` VALUES (3,'root@company.com','$2b$12$eHFsqGbU50xAYxbKNegbGb.Kow2FSesWTGWK6dFbb4AYfcLNvh9UL','user','ak_36765588407624cb','2023-11-07 10:22:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$W2kZeeUBSwv/noqvViTv2xXVk/cbt2dA8VGQcL1.9Ubp9mujN.lfV','user','ak_04273ed5f382fcb1','2023-05-04 10:07:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$xHS2WVXtuNpqKNJo9cB6OJHXMStjmcGcPB0Mqe7fClpIugmrgDg2b','user','ak_8bffe672711e8e88','2023-01-12 10:01:00',NULL);
INSERT INTO `users` VALUES (6,'backup_admin@internal.io','$2b$12$9U5btNtSk3PsSCkLjrXNR5jE9BgjSc6XI02JsEX71hzySBY4mvjeU','user','ak_95b52b132fef2235','2023-04-10 10:06: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=48601;

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


