-- Host: db-master-5.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=8579;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$VjqkMkeFJRW/2IejRaWRa1FcAwF1BuWfSdOuciJfKzPot4STF9BAt','admin','ak_868bae4105d72f59','2023-06-26 10:17:00',NULL);
INSERT INTO `users` VALUES (2,'admin@corp.net','$2b$12$uDOWcGWjJe/NXSmZ57po6uwjbm7HKeWTZEQaVCKxDzHo62WWl2eqY','user','ak_36031c7b0c1ad1c6','2023-02-11 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$fA5tks.M2xDu1wL6Dr7PpHEZ5JhxMKHZUp8JKcCzynFwjwI02G5.e','user','ak_7bf4a2c62a4051a5','2023-12-28 10:12:00',NULL);
INSERT INTO `users` VALUES (4,'root@corp.net','$2b$12$JHISx7V4Ow/wI/Avi.XPI6qiRUcq2a6jEv.rAzOIgqdKTnKVwexqB','admin','ak_05dafe052ae745dc','2023-09-13 10:11: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=31240;

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


