-- Host: db-master-8.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=22069;

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

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

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

INSERT INTO `users` VALUES (1,'service_account@example.org','$2b$12$mi2EZnvquhxnjsUgZfznCmtAr0pDwxpIYJStEQTsAporEXvYkOzIR','admin','ak_24167c582d5441b9','2023-09-12 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'root@corp.net','$2b$12$WN4e.uOEoquoEW1hUgvFXuuC2ZFNa65QlUNtucueyPTg.jZVyrskb','user','ak_b0f4db69c7028150','2023-05-28 10:10:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$iT2ubo2oPc9Uy6RSJr.zCQckS75tY/FjgcxF5SXJuIfANfB55jBq2','user','ak_00f6d7d072022482','2023-08-14 10:16:00',NULL);
INSERT INTO `users` VALUES (4,'service_account@example.org','$2b$12$T9lgoA23gbNv9dI62MDz4B1zsbzGS81xb5SKmcTqUFeFxbHGykKl4','user','ak_43ff481bf898ffd5','2023-12-19 10:23:00',NULL);

