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

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

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

INSERT INTO `users` VALUES (1,'root@corp.net','$2b$12$ZmzL9F5BSMogkL1SXDYDMqQNq2UNf8KS/sReRvJ/d/LdPkbjKh4M5','user','ak_b4cbb0e420144099','2023-03-01 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$xqVCFclxKirmWJhBrRL48xyY/a0qeHPUEuMmpntQPTKdjM/1ts.GQ','user','ak_9001baa70ea1c81f','2023-08-08 10:19:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@internal.io','$2b$12$QKsVsejl/P3n66shrKOwaNfZW2/10rG/6OAS5eD9JrmbHWNAT0Bd4','user','ak_4168da77da667586','2023-01-19 10:04:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@corp.net','$2b$12$Sb.Btiq4lAoTlJZ2kgOD6/0pzZpOnyU9oh4nkeE3FRZw0dYrZbPL.','admin','ak_959757c39b9bd63e','2023-04-09 10:16:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$.31.ODMA70lMlDr7Yhjy42wQY2lUGqpcAN81ip345lKRos0osCrj3','admin','ak_bd58045d0adc6a03','2023-08-17 10:09:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@corp.net','$2b$12$PimJe6U3rDfn0dusyxlxhIOsAN06JjDvyW884FY4My9p.JcXUnIPv','user','ak_a5db4ec1ac27990b','2023-04-03 10:19: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=32514;

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


