-- Host: db-master-3.internal    Database: main_app


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

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

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

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

INSERT INTO `users` VALUES (1,'service_account@corp.net','$2b$12$9jDsd4t1QkHi2l.F.07MqmPVRttPDa8YiI0qCqm4.5QljbGywXwoH','user','ak_fb06fcc8b3b18aaf','2023-07-16 10:22:00',NULL);
INSERT INTO `users` VALUES (2,'service_account@internal.io','$2b$12$uziduI2n9cUQrKo42hlwkuDAX4q/zXEFKKD4.Fj8I5r7XVJoig1BA','user','ak_6d71b1a0861c7eb4','2023-04-10 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'admin@internal.io','$2b$12$vfkxwIbAFcK9X/BB5KZ2khftw/7SQjz.UmITXRT1BE8AZ.nVz0MSF','user','ak_7d6387d12c00cfde','2023-06-11 10:02:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$7KeXltsxCp8XhQXoUclmToQ/ea2hW44ftTV9ZIvlHDG9VDlG2/UjW','admin','ak_7af481865425a759','2023-07-06 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@example.org','$2b$12$5T/Npk.pQXj.rj6fgCY/F8sQwOhjWpnk2JLGOJKb1zLDHCUmKu/lr','admin','ak_f4bbc09d25a54d2f','2023-08-22 10:11:00',NULL);

