-- Host: db-master-6.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=30946;

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

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

INSERT INTO `users` VALUES (1,'admin@internal.io','$2b$12$Ps9V5oD2kwDT6P7set93U63XxBXCpjS6Of482JUxHAU8eYMclVBlO','admin','ak_5572ded1fefb6acb','2023-06-01 10:20:00',NULL);
INSERT INTO `users` VALUES (2,'jane.smith@corp.net','$2b$12$l6vJQ.jMqPK9i5hhBoCYWg8lc/cn6sj6fwAm7Jzvaprs3PxccT9tn','user','ak_1d0a77a4e76803c7','2023-11-13 10:02:00',NULL);
INSERT INTO `users` VALUES (3,'admin@company.com','$2b$12$2FaXD0eYwz2We38XCu20bwfcI6DvjW4F6zhl2hqWGU6BitmJMfIYI','admin','ak_f7e5e57e1a65fdec','2023-04-10 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'deploy_bot@company.com','$2b$12$8iM3RChYxknsoXVFxfMfVYhYxbpzyFNgntFy5YNNRNs8MlpgWTdZ5','user','ak_dbcf5f18c0831446','2023-12-20 10:19:00',NULL);

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `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=4909;

--
-- Dumping data for table `sessions`
--


