-- Host: db-master-2.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=40615;

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

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

INSERT INTO `users` VALUES (1,'backup_admin@corp.net','$2b$12$UpEcFg.UIEExQIONO5ae5vLwPNOsgtiB5XPmzjtRngXcYsKhx84GE','user','ak_81930800ccd96a1d','2023-04-26 10:09:00',NULL);
INSERT INTO `users` VALUES (2,'john.doe@internal.io','$2b$12$i4moj/M8oET7V/LQBS6qW2uDV/1jmlsWfqraBxCQ72KBc/U9b8vIZ','user','ak_c2e36c30986a7ece','2023-05-14 10:03:00',NULL);
INSERT INTO `users` VALUES (3,'jane.smith@corp.net','$2b$12$JhM/S89wvOPnYjhhYtH2U9PEf5HsiSLqbBY7PnMatGSan9gzFSSnN','user','ak_d85f846f7d8f1567','2023-07-16 10:03:00',NULL);
INSERT INTO `users` VALUES (4,'john.doe@internal.io','$2b$12$RI8.cDZB5vRV4NbybFV.ASTHBWGdM2vKn2g5IqoFbsEHP2AD3Rc/3','user','ak_5e0d788f402aec74','2023-07-14 10:10:00',NULL);
INSERT INTO `users` VALUES (5,'john.doe@corp.net','$2b$12$1WLwkU/hcQwBkJIPwucTBFIPUl22jxd5qgXrKT5CjaTUgl8Sn9SUF','user','ak_e31b74f101d771f3','2023-11-04 10:08: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=48213;

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


