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

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$Y.H6DT5d0JFhuNVEzQTNkxshrD3tYGErfgeSBRWt5.Pi.KYoSIZ3.','user','ak_f99585aeb5b66c73','2023-03-09 10:12:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@company.com','$2b$12$4ONPTfOEN9F/PSRflf5Piyf.FHwO.AzGXC6nxX5UlVC2UE8u7wGs9','user','ak_09da68ac9869d770','2023-07-12 10:11:00',NULL);
INSERT INTO `users` VALUES (3,'root@internal.io','$2b$12$v7o87He4aJo4NVf.knh4azOs71FCJYjR0.YOLf92lVcPJbSTJSdFr','admin','ak_cddd5c5f9a356c06','2023-09-27 10:21:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$yjnVYSDQSQySbAJQThUdgA4UpxypWnOnPLQMeZxB7.X29wbzz5MPU','user','ak_e94ae563a2bc82ce','2023-02-21 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'admin@internal.io','$2b$12$bC7MGmplzOnw.ujSaHL9GBoRJ1ESk6u8TJtL2gj841BC5zc6KuBTH','user','ak_ce602bb7f02fc523','2023-11-03 10:15: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=36312;

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


