-- Host: db-master-4.internal    Database: analytics


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

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


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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$xbVVfMN0aCTaFF7uK6/xTiICD8BSDpb5WCct2IBjPT7NHeUeWXKrC','user','ak_a81f8c053935ba6b','2023-09-19 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@company.com','$2b$12$GorEVy.M76UepHDezAay9xgUDzVXJYWE.qcxA.xVXH1r5muwL9gd5','user','ak_72a72f7285178fa3','2023-05-15 10:04:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@corp.net','$2b$12$IzyebbPl/iau7xBfY4ck9ZMIpOM4aqA6lCT0EsFSK6sa5y0wE8XDj','user','ak_17443b8fe219a960','2023-09-08 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'admin@example.org','$2b$12$IUCiIrbf3He9GdiyJLc1LcjNIwF0yAlvaFg50DARlRPvZ3PcCUfT9','admin','ak_6dd6d562509eed4e','2023-09-17 10:15:00',NULL);

