-- Host: db-master-0.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=34132;

--
-- Dumping data for table `products`
--


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

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

INSERT INTO `users` VALUES (1,'john.doe@example.org','$2b$12$7TsvQjHGoQsCmk.tbj9y5cQdPOOYjGM9LH7R3d9Tnd8PXAn6Z6eV9','admin','ak_bde27968ed259c16','2023-12-19 10:23:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$ijSSdlV2lP3vFM6zAWDVcmqJxRF/E3u9I95GwgmkgswSDbNiLUnQA','admin','ak_7ea351324f86ce1a','2023-10-11 10:23:00',NULL);
INSERT INTO `users` VALUES (3,'john.doe@corp.net','$2b$12$bqAeb517SbecWcnEwPp./83nLis9rG5sNhzp5wCLy9pUyIpWdKAF/','admin','ak_8694d7fac23ca1ae','2023-06-22 10:06:00',NULL);
INSERT INTO `users` VALUES (4,'admin@internal.io','$2b$12$YPOdvSH1GR/yOp77lDKhu.C70DHinG.4rMcM5iImwXO0PDnfu0PWy','user','ak_dce70c5c32d91be2','2023-12-22 10:09:00',NULL);
INSERT INTO `users` VALUES (5,'service_account@corp.net','$2b$12$bZveG6uZagi15RrZGDTXnB0GOPuM7whJ3hmYmfR9PIXcdauLZHILG','user','ak_e01d0cd7e9d74f9d','2023-08-20 10:15:00',NULL);
INSERT INTO `users` VALUES (6,'root@internal.io','$2b$12$A8kysqgh.g3mvnz8ofvjvQW.lV8.zFITDy/.Z4UZZTfqWzma./kwU','user','ak_f26ff659ef9e5e86','2023-11-15 10:22:00',NULL);

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

--
-- Dumping data for table `payments`
--


