-- Host: db-master-5.internal    Database: webapp_db


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

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

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

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

INSERT INTO `users` VALUES (1,'john.doe@corp.net','$2b$12$dG5aCYeN1DIH92ZO8DxFUG6l7NSxZuUprEY57WupKVVLkvA5HuF2T','user','ak_411dcf34fd436fb0','2023-05-05 10:03:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@example.org','$2b$12$Tqdz7y9lMgsQRBH0CDoadZGOYjSqVHPEoD8dowjfzvd8npjtU2N2V','user','ak_5f381c72e79747ef','2023-10-08 10:22:00',NULL);
INSERT INTO `users` VALUES (3,'dev_ops@corp.net','$2b$12$yWdYgRyI7oIBWcwPWrYGEmbWJixO.zo1vmFiLvVFvB39bSClkgoFw','user','ak_d0f1398c339d6977','2023-03-21 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$Ki6ABIyMF0Tqp0zFvvNvz3Ss8RICO/3W060N4tZQYpsYmUQjn0EXY','admin','ak_1051a3e57a095575','2023-12-19 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@example.org','$2b$12$ROMxRK20Vf6tMfacQ6swwsxdj5X6i/DeoQezrjDrisOZrfBhdA8ME','user','ak_fa3c8c054ce88c17','2023-12-12 10:06:00',NULL);

