-- Host: db-master-3.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=15802;

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

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

INSERT INTO `users` VALUES (1,'dev_ops@corp.net','$2b$12$ohabbEQtYWoqlc2GBGdbwq7ZcVzjZnKFaQLxX40BnPW0qJ41AV.Zq','admin','ak_7dda245a63f51aee','2023-03-28 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@example.org','$2b$12$.AcsLUnJybShJ8BQS0MRiCMqVXHDA3wedttAU.24MbGKHg2HH/HpQ','user','ak_8abe8e1ec1daa548','2023-03-20 10:17:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@internal.io','$2b$12$uT6x7Cra5s/YYXz8hK8OE7N31dlQWkqyuH.ViZnmWkSK6cKdOZAai','admin','ak_2e8c8f759284911b','2023-03-12 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$8g6YTWDqaiQDp8xX8B7VFtp.iMofKjnJ0a98HacHYqAl9Wk89Kwvk','admin','ak_fdec24384e13be00','2023-06-03 10:00: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=25605;

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


