-- Host: db-master-1.internal    Database: analytics


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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$dw3wIgyMLu5Ew2.pUB5.B9RNAP8hR7BZmhZXIoNn.AZNxla8n4dQw','user','ak_343097590273e619','2023-09-01 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$m9uAMH0qqkK6.WATsQl4yj/kOLPONdAh5XN38.PAPIBbW4fk86KT4','user','ak_8da92dc866ac2029','2023-05-21 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@company.com','$2b$12$PH.xHUmOU4TFVkUcBt2CIHjcQHELf78ABQ8DyAvEshY3do2Ao/7CZ','admin','ak_2f39148d2c2a82f9','2023-01-24 10:14:00',NULL);
INSERT INTO `users` VALUES (4,'root@company.com','$2b$12$2VxJJSNjag5tCu7vYzPn5IcK48cJ5PY1oJMm3UcNuLth0uDuXYnbr','user','ak_e56c9351b8ff7616','2023-01-03 10:20:00',NULL);
INSERT INTO `users` VALUES (5,'root@example.org','$2b$12$iaoQSIriZiSFICSH5RNVbGcI4fgG2LlAdj4qWmNOxPqs27jvqmWsY','user','ak_aba92e6fbc2343d4','2023-05-22 10:18: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=19273;

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


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

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


