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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$2WcD5G5uV2aDj7xNkY5jpcm4D7KOB7yGskutAwfcykMUzLRUKWTgB','admin','ak_28b8e49584a40ddc','2023-06-17 10:05:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$P7DlfYX86hexnu/CEaOp17FDY/y0mIz4QR0DBlTBOTj.o9/qJmps/','user','ak_7c37f12ec27d3c47','2023-08-22 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$z4/sg39Nblv9L.GHo8sZ6LneeSv7Kc2E1PEMYZyGcU/oFSV8vILBs','admin','ak_61eaa6a8ed26bc81','2023-06-07 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$BYdxnbn40nN4DdUrzEwxYpyY3UCillLL2RfvkNsg2TK6IfVq2m7hc','admin','ak_61ab9504a51fd21c','2023-06-17 10:01: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=50837;

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


