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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@internal.io','$2b$12$/ck8MfN.fOawwmpy30LbN9f.Jvsb1nMqyd/9e1nGzJuvoA9BZPSVa','user','ak_75dcfd093e9cec51','2023-02-25 10:08:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$rTtrbgaGRNKpiWSDjKMXWqh2Tx9ulXTdPIOS9y7UazhbHC0KtwIEY','user','ak_caf019e15b477526','2023-05-13 10:20:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@example.org','$2b$12$h8sr7ibETLdUG/qDcG5klQfRxjhFbJenJO6P49aufTQtPq8zTe4sl','admin','ak_00a9395cd64f1ba4','2023-03-10 10:18:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@corp.net','$2b$12$RP9THcgvn8qASeINDM0kdMsOY0lr2sbH/VE5tahsn6cDHEj9IPWxA','admin','ak_1be30d805e2d5919','2023-12-19 10:02:00',NULL);
INSERT INTO `users` VALUES (5,'admin@corp.net','$2b$12$k90tqQ274bv1zoHnCFa1HSvrwh31fNT.IjYh.bn8ARJBIPNS1ZpLn','user','ak_71b25c083b0d63a9','2023-11-22 10:12:00',NULL);
INSERT INTO `users` VALUES (6,'jane.smith@example.org','$2b$12$J1QuWrk3MZ9fbt.bPXL3sVoRc8kcPPWxUgz7VAj8sbnX0rxorjjtV','user','ak_eadc8e5f2519327b','2023-01-19 10:05: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=48809;

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


--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `user_id` bigint unsigned NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `status` enum('pending','shipped','delivered') DEFAULT 'pending',
  `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=23348;

--
-- Dumping data for table `orders`
--


