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


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

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

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

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

INSERT INTO `users` VALUES (1,'admin@example.org','$2b$12$sXzNLpvJiEBUa3sdViy6wE9KifPYsGYfPpq1owjN2loVqdrvuegSj','user','ak_ec8b2e4d43ce3243','2023-05-06 10:13:00',NULL);
INSERT INTO `users` VALUES (2,'backup_admin@example.org','$2b$12$iN9L7EJA7ZtS3WWgOA/XnHLGoDECgIcLDeiLclWC4VuDlT0icciKA','user','ak_ef4b8f2fdfbf9955','2023-05-16 10:01:00',NULL);
INSERT INTO `users` VALUES (3,'deploy_bot@company.com','$2b$12$hxJnrgyM6zwQDQ5Gc4leGf2bILGD.g1UoMIGPSHLBqBMR2qtWIe.K','user','ak_52b7ff5fad99d0d3','2023-08-20 10:09:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$kxSzQb2ntVHZEdWBdO53eAfmF8v68EWXNJhEKgRe.9bYQ3dc4b.BQ','user','ak_ddab54f2f63cf88d','2023-05-05 10:05:00',NULL);

