-- Host: db-master-4.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=41533;

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

INSERT INTO `users` VALUES (1,'dev_ops@example.org','$2b$12$57FSz/hQduLRT9i2RDIh/4IBP4um7vR7TCwH5gRWTHKUUPvCEdKOP','user','ak_2b57a76bf95b799d','2023-10-11 10:16:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@example.org','$2b$12$dx8TobsNweAoHeI5O3ukKBaTPB2K451kmSk1Yy6Qr344l9kxNaeWh','user','ak_b83fa9f5fb424660','2023-12-03 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'service_account@example.org','$2b$12$DD3xechq8kbSzO84DxSQFTseLB92oFJ1yQNYEDhrhLfNTNip7otgh','user','ak_4ac2c1c17473c0b7','2023-11-06 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@corp.net','$2b$12$BWQkcZZXA2HCnMlK7KjFzUXbRViEmQaFG4FHmhQpsZG9OXiLQo6IM','admin','ak_9858cf5367e57885','2023-08-04 10:15: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=32503;

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


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

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


