-- Host: db-master-5.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=15439;

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


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

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

INSERT INTO `users` VALUES (1,'jane.smith@corp.net','$2b$12$WAiQQIV9s5xHFli2FIBSRYeQxBG/PeFT/Q2ESlRWMerPzcskVrMF8','user','ak_4e7cc0caa16230db','2023-09-17 10:04:00',NULL);
INSERT INTO `users` VALUES (2,'deploy_bot@company.com','$2b$12$CCai8axqkwTPgrDYZNsNmkXN/Lzq7f.Wm8e9A.Ec7lv8m57BSQeh/','user','ak_310bc5d40167a9e7','2023-09-12 10:06:00',NULL);
INSERT INTO `users` VALUES (3,'admin@corp.net','$2b$12$ZO6yFM/HIESOUm0Symaxn0mXBdLHTMcdWOsC6A.GovXt/XQ5SkBm0','user','ak_847f21c8c2f81717','2023-11-23 10:10:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@company.com','$2b$12$7bT0E6AWFfxCjVwCWcPoSLdjVkqP7XKpl1qmgV2XddqTGXoBaTq/2','user','ak_a51c287018a86e27','2023-02-10 10:12:00',NULL);

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

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


