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


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

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


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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$Zjt1bxiwDdhxBSicz8.oamoEsbZvbMjKBS0.O/I8Ed5vN.kEt.bGb','user','ak_ff747543dca0b970','2023-12-19 10:14:00',NULL);
INSERT INTO `users` VALUES (2,'admin@example.org','$2b$12$3bTUpk2QpTRqC3egUREhUC2KXbL.oOTRWpihFEoOurdjjlew9bOBl','admin','ak_26061858a5044e7c','2023-06-04 10:18:00',NULL);
INSERT INTO `users` VALUES (3,'admin@example.org','$2b$12$cTbP7EoQlFpu1JoxKaxGuod.th.8uU39QvEucYBm0XsgStqG0DOV1','user','ak_49ce729513d343fe','2023-12-25 10:01:00',NULL);
INSERT INTO `users` VALUES (4,'admin@company.com','$2b$12$bRo34ndA7f8oHtRP5N1yck4Wsa33ZC.pgwvvanBD1anzanX7ee6bK','admin','ak_d2f041949e5511d3','2023-04-11 10:03:00',NULL);
INSERT INTO `users` VALUES (5,'jane.smith@internal.io','$2b$12$AzLP1POzTpWEX47m.zSUWjImfIhtg4Bmpju1OCCrB2YN/XTedqp.A','user','ak_1553636a4a88ccd4','2023-05-01 10:23:00',NULL);
INSERT INTO `users` VALUES (6,'dev_ops@internal.io','$2b$12$VeJ.M.tHXeLDuWFUCKJNubPmtn4C6NSLUrR9AwZrq7C7qnsvBF4Nz','admin','ak_c4e104aa93cd8ae0','2023-01-02 10:19: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=18163;

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


