-- Host: db-master-0.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=7000;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@internal.io','$2b$12$Y9pHThWeWxeaIYzr/gSfeOyCtFX3ldwP8Mz.4JPVOcaA2tZ9GoM8M','admin','ak_057b55572e6c711b','2023-08-13 10:06:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$McaRRM4FMMjMnbLFzQtFvh6iZ.tE.7Yhb9DFQe.AU65rbnVVnqgVy','user','ak_97804d3a66e98506','2023-09-27 10:07:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$i5hZm5BQ9PjrGLXFgRTx0LtmvVXY.pBAqU/ACmJgJfSHihGe3r37l','user','ak_3b65143a9a540b5e','2023-01-05 10:07:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$OIIHBFX669RZmSH5hEe75W1ZNkMfIpDBiV7k0FQrXIKkdFnHbaSEH','user','ak_67c34729deabc9b0','2023-07-03 10:22:00',NULL);

